Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
menu.php
1
<?php
2
3
namespace
Bitrix\Catalog\Component\Preset
;
4
5
use
Bitrix\Main\Config\Option
;
6
use
Bitrix\Main\Loader
;
7
8
class
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
}
Bitrix\Catalog\Component\Preset\Menu
Definition
menu.php:9
Bitrix\Catalog\Component\Preset\Menu\isOn
isOn()
Definition
menu.php:24
Bitrix\Catalog\Component\Preset\Menu\disable
disable()
Definition
menu.php:17
Bitrix\Catalog\Component\Preset\Menu\enable
enable()
Definition
menu.php:10
Bitrix\Catalog\Component\Preset\Menu\clearCache
clearCache()
Definition
menu.php:29
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Main\Loader
Definition
loader.php:12
Bitrix\Catalog\Component\Preset\Preset
Definition
preset.php:6
Bitrix\Catalog\Component\Preset
Definition
crm.php:4
Bitrix\Landing\$GLOBALS
$GLOBALS['____1979065141']
Definition
mutator.php:1
modules
catalog
lib
component
preset
menu.php
Создано системой
1.10.0