method public

UserRepositoryInterface::getSender()

Класс: \Bitrix\Tasks\Internals\Notification\UserRepositoryInterface

Сигнатура

public getSender(TaskObject $task[, array<string|int, mixed> $optional = [] ]) : User|null

Параметры

$task TaskObject
$optional array<string|int, mixed> = []

Возвращаемое значение

User|null

Как применяется в UserRepositoryInterface

UserRepositoryInterface::getSender() — метод интерфейса \Bitrix\Tasks\Internals\Notification\UserRepositoryInterface модуля «Задачи».

Метод объекта: сначала нужен объект, реализующий UserRepositoryInterface.

use Bitrix\Main\Loader;
use Bitrix\Tasks\Internals\Notification\UserRepositoryInterface;

Loader::includeModule('tasks');

/** @var UserRepositoryInterface $object */
$task = null; // TaskObject
$result = $object->getSender($task);
// $result: User|null

Другие методы UserRepositoryInterface

getSender() есть и у других классов модуля «Задачи»: CommentCreatedStrategy, FakeStrategy, Message, NotificationReplyStrategy, OnTaskFirstViewEvent, RecipientStrategyInterface, RegularTaskReplicatedStrategy, RegularTaskStartedStrategy.

Исходный файл: source/tasks/lib/internals/notification/userrepositoryinterface.php:17

Что будем искать? Например,Продвижение