2namespace Bitrix\Landing\Restriction;
4use \Bitrix\Bitrix24\Feature;
12 'gtm' =>
'limit_sites_google_analytics',
13 'gacounter' =>
'limit_sites_google_analytics',
14 'yacounter' =>
'limit_sites_google_analytics',
15 'copyright' =>
'limit_sites_powered_by',
16 'headblock' =>
'limit_sites_html_js',
17 'theme' =>
'limit_sites_change_color_palette',
27 $hookCode = strtolower($hookCode);
28 return isset(self::MAP[$hookCode]) ? self::MAP[$hookCode] :
null;
38 $hookCode = strtolower($hookCode);
39 if (isset(self::MAP[$hookCode]))
41 return self::isAllowed(self::MAP[$hookCode]);
57 $mapFlip = array_flip(self::MAP);
61 isset($mapFlip[
$code]) &&
65 return Feature::isFeatureEnabled(
'landing_hook_' . $mapFlip[
$code]);
static isHookAllowed(string $hookCode)
static getRestrictionCodeByHookCode(string $hookCode)
static isAllowed(string $code)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code