73 \CJSCore::init(
'sidepanel');
74 \Bitrix\Landing\Site\Type::setScope(
78 $bindings = Binding\Menu::getList(
null);
82 foreach ($bindings as $binding)
84 if (!isset($bindingsAssoc[$binding[
'BINDING_ID']]))
86 $bindingsAssoc[$binding[
'BINDING_ID']] = [];
88 $bindingsAssoc[$binding[
'BINDING_ID']][] = $binding;
90 $bindings = $bindingsAssoc;
91 unset($bindingsAssoc);
95 $bindingMap = Menu::getMap();
98 foreach ($bindingMap as $sectionCode => $bindingSection)
100 foreach ($bindingSection[
'items'] as $itemCode => $foo)
104 $bindingCode = $sectionCode .
':' . $itemCode;
105 if (isset($bindings[$bindingCode]))
107 foreach ($bindings[$bindingCode] as $bindingItem)
110 'id' =>
'landing_' . $bindingItem[
'ENTITY_TYPE'] . $bindingItem[
'ENTITY_ID'],
111 'text' => \htmlspecialcharsbx($bindingItem[
'TITLE']),
112 'href' => $bindingItem[
'PUBLIC_URL'],
113 'sectionCode' => Menu::SECTIONS[
'knowledge']
115 $unbindItems[] = self::getMenuItemUnbind(
117 $bindingItem[
'ENTITY_TYPE'] .
'_' . $bindingItem[
'ENTITY_ID'],
118 $bindingItem[
'TITLE']
122 $menuItems = array_merge(
124 self::getMenuItemBind($bindingCode)
129 'id' =>
'landing_unbind',
130 'extension' =>
'landing.connector.intranet',
131 'text' =>
Loc::getMessage(
'LANDING_CONNECTOR_INTRANET_MENU_HIDE_TITLE'),
132 'items' => $unbindItems
143 'items' => $menuItems
148 \Bitrix\Landing\Site\Type::clearScope();