- Модуль: intranet
- Путь к файлу: ~/bitrix/modules/intranet/lib/Site/Sections/AutomationSection.php
- Класс: BitrixIntranetSiteSectionsAutomationSection
- Вызов: AutomationSection::getRootMenuItem
static function getRootMenuItem(): array
{
$extraUrls = [];
$firstItemUrl = '';
foreach (static::getItems() as $item)
{
if ($item['available'])
{
if (isset($item['menuData']['real_link']) && is_string($item['menuData']['real_link']))
{
if (empty($firstItemUrl))
{
$firstItemUrl = $item['menuData']['real_link'];
}
}
if (isset($item['url']) && is_string($item['url']))
{
$extraUrls[] = $item['url'];
if (empty($firstItemUrl))
{
$firstItemUrl = $item['url'];
}
}
if (isset($item['extraUrls']) && is_array($item['extraUrls']))
{
$extraUrls = array_merge($extraUrls, $item['extraUrls']);
}
}
}
return [
Loc::getMessage('AUTOMATION_SECTION_ROOT_ITEM_TITLE'),
static::getPath(),
$extraUrls,
[
'menu_item_id' => 'menu_automation',
'top_menu_id' => 'top_menu_id_automation',
'counter_id' => 'bp_tasks',
'first_item_url' => $firstItemUrl,
],
'',
];
}