Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
knowledge.php
1<?php
3
4use \Bitrix\Landing\Role;
5use \Bitrix\Landing\Manager;
6use \Bitrix\Landing\Domain;
7use \Bitrix\Landing\Site\Scope;
8
9class Knowledge extends Scope
10{
16 public static function init(array $params = [])
17 {
18 parent::init($params);
19 Role::setExpectedType(self::$currentScopeId);
20 }
21
26 public static function getPublicationPath()
27 {
28 if (\Bitrix\Landing\Connector\Mobile::isMobileHit())
29 {
30 return '/mobile/knowledge/';
31 }
32
33 return '/knowledge/';
34 }
35
40 public static function getKeyCode()
41 {
42 return 'CODE';
43 }
44
49 public static function getDomainId()
50 {
51 if (!Manager::isB24())
52 {
53 return Domain::getCurrentId();
54 }
55 return 0;
56 }
57
62 public static function getFilterType()
63 {
64 return self::getCurrentScopeId();
65 }
66
71 public static function getExcludedHooks(): array
72 {
73 return [
74 'B24BUTTON',
75 'COPYRIGHT',
76 'CSSBLOCK',
77 'FAVICON',
78 'GACOUNTER',
79 'GTM',
80 'HEADBLOCK',
81 'METAGOOGLEVERIFICATION',
82 'METAMAIN',
83 'METAROBOTS',
84 'METAYANDEXVERIFICATION',
85 'PIXELFB',
86 'PIXELVK',
87 'ROBOTS',
88 'SETTINGS',
89 'SPEED',
90 'YACOUNTER',
91 'COOKIES'
92 ];
93 }
94}
static getCurrentId()
Definition domain.php:148
static setExpectedType($type)
Definition role.php:545
static init(array $params=[])
Definition knowledge.php:16