- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/lib/Site/Sections/AutomationSection.php
- Класс: BitrixIntranetSiteSectionsAutomationSection
- Вызов: AutomationSection::getTasksRobots
static function getTasksRobots(): array
{
if (!Loader::includeModule('tasks'))
{
return [];
}
$baseUrl = '/company/personal/user/' . CurrentUser::get()->getId() . '/tasks/';
$items = [
[
'TEXT' => Loc::getMessage('AUTOMATION_SECTION_TASKS_MY_TITLE'),
'URL' => $baseUrl . '#robots',
],
[
'TEXT' => Loc::getMessage('AUTOMATION_SECTION_TASKS_PROJECTS_TITLE'),
'URL' => $baseUrl . 'projects/#robots',
],
[
'TEXT' => Loc::getMessage('AUTOMATION_SECTION_TASKS_SCRUM_TITLE'),
'URL' => $baseUrl . 'scrum/#robots',
],
];
if (Loader::includeModule('crm'))
{
$router = CrmServiceContainer::getInstance()->getRouter();
$items[] = [
'TEXT' => Loc::getMessage('AUTOMATION_SECTION_TASKS_CRM_TITLE'),
'URL' => $router->getItemListUrlInCurrentView(CCrmOwnerType::Deal) . '#robots',
];
}
return [
'TEXT' => Loc::getMessage('AUTOMATION_SECTION_TASKS_ITEM_TITLE'),
'URL' => $baseUrl,
'ITEMS' => $items,
];
}