Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
menu.php
1<?php
2
4
7
8class Menu implements Preset
9{
10 public function enable()
11 {
12 Option::set('intranet', 'left_menu_crm_store_menu', 'Y');
13
14 $this->clearCache();
15 }
16
17 public function disable()
18 {
19 Option::set('intranet', 'left_menu_crm_store_menu', 'N');
20
21 $this->clearCache();
22 }
23
24 public function isOn(): bool
25 {
26 return Option::get('intranet', 'left_menu_crm_store_menu', 'N') === 'Y';
27 }
28
29 protected function clearCache()
30 {
31 \CBitrixComponent::clearComponentCache('bitrix:menu');
32 $GLOBALS['CACHE_MANAGER']->CleanDir('menu');
33 $GLOBALS['CACHE_MANAGER']->ClearByTag('bitrix24_left_menu');
34
35 if (Loader::includeModule('intranet'))
36 {
37 \Bitrix\Intranet\Composite\CacheProvider::deleteUserCache();
38 }
39 }
40}
$GLOBALS['____1979065141']
Definition mutator.php:1