- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/ui/component/templatehelper.php
- Класс: BitrixTasksUIComponentcontains
- Вызов: contains::initializeExtension
public function initializeExtension(array $data = array())
{
CJSCore::Init($this->getExtensionId());
$component = $this->template->__component;
$arResult = $component->arResult;
$jsData = ($arResult['JS_DATA'] ?? null);
$data = array_merge((is_array($jsData) ? $jsData : array()), $data, array(
'id' => $this->id, // to register in dispatcher
'url' => $component->__path.'/ajax.php',
'viewUrl' => $this->template->getFolder().'/ajax.php',
'componentClassName' => $component->getComponentClassName(),
'componentId' => $component->getId(), // md5() from component signature :)
'hintState' => UI::getHintState(), // todo: when collection implemented, move this outside, leave handy shortcut in component.js
'user' => (isset($arResult['AUX_DATA']['USER']) && is_array($arResult['AUX_DATA']['USER'])) ? $arResult['AUX_DATA']['USER'] : array(), // todo: the same as above
'userNameTemplate' => $this->findParameterValue('NAME_TEMPLATE'), // todo: the same as above
'modulesAvailable' => ($this->getComponent()->arResult['COMPONENT_DATA']['MODULES'] ?? null),
));
?>
}