method public

StrategyConstructorTrait::__construct()

Класс: \Bitrix\Tasks\Internals\Notification\Strategy\Default\StrategyConstructorTrait

Сигнатура

public __construct(UserRepositoryInterface $userRepository, TaskObject $task, Dictionary $dictionary) : mixed

Параметры

$userRepository UserRepositoryInterface
$task TaskObject
$dictionary Dictionary

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

mixed

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

StrategyConstructorTrait::__construct() — метод трейта \Bitrix\Tasks\Internals\Notification\Strategy\Default\StrategyConstructorTrait модуля «Задачи».

Конструктор: создаёт экземпляр StrategyConstructorTrait — обязательные аргументы перечислены в разделе «Параметры».

use Bitrix\Main\Loader;
use Bitrix\Tasks\Internals\Notification\Strategy\Default\StrategyConstructorTrait;

Loader::includeModule('tasks');

$userRepository = null; // UserRepositoryInterface
$task = null; // TaskObject
$dictionary = null; // Dictionary
$object = new StrategyConstructorTrait($userRepository, $task, $dictionary);

__construct() есть и у других классов модуля «Задачи»: AbstractCase, AbstractConverter, AccessInstaller, AccompliceConverter, Agent, AuditorConverter, BaseEvent, ChecklistAddRule.

Исходный файл: source/tasks/lib/internals/notification/strategy/default/strategyconstructortrait.php:11

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