2namespace Bitrix\Landing\Site;
4use Bitrix\Landing\Role;
5use Bitrix\Landing\Site;
7use Bitrix\SignSafe\Processing\Preview;
32 self::SCOPE_CODE_GROUP,
33 self::SCOPE_CODE_KNOWLEDGE,
34 self::SCOPE_CODE_MAINPAGE,
56 $scope = trim($scope);
57 $class = __NAMESPACE__ .
'\\Scope\\' . $scope;
58 if (class_exists($class))
74 if (preg_match(
'#^/' . self::PSEUDO_SCOPE_CODE_FORMS .
'\d*/$#', $siteCode))
76 return self::PSEUDO_SCOPE_CODE_FORMS;
90 if (!is_string($scope) || !$scope)
96 self::$scopeInit =
false;
98 if (self::$currentScopeClass)
100 self::$scopeInit =
true;
101 self::$currentScopeClass::init(
$params);
111 self::$scopeInit =
false;
112 self::$currentScopeClass =
null;
124 return !in_array($scope, self::SCOPES_NOT_PUBLIC);
136 if (self::$currentScopeClass !==
null)
138 $path = self::$currentScopeClass::getPublicationPath();
139 $scope = self::$currentScopeClass::getCurrentScopeId();
143 $event =
new Event(
'landing',
'onGetScopePublicationPath', [
162 if (self::$currentScopeClass !==
null)
164 return self::$currentScopeClass::getKeyCode();
176 if (self::$currentScopeClass !==
null)
178 return self::$currentScopeClass::getDomainId();
190 if (self::$currentScopeClass !==
null)
192 return self::$currentScopeClass::getCurrentScopeId();
205 if (self::$currentScopeClass !==
null)
207 return self::$currentScopeClass::getFilterType();
211 return $strict ? null : [
'PAGE',
'STORE',
'SMN'];
220 if (self::$currentScopeClass !==
null)
222 return self::$currentScopeClass::getExcludedHooks();
235 if (is_string(
$code))
238 $types = Site::getTypes();
239 if (array_key_exists(
$code, $types))
257 self::$currentScopeClass !==
null
258 && is_callable([self::$currentScopeClass,
'getOperationsForSite'])
261 return self::$currentScopeClass::getOperationsForSite(
$siteId);
275 self::$currentScopeClass !==
null
276 && is_callable([self::$currentScopeClass,
'prepareBlockManifest'])
279 return self::$currentScopeClass::prepareBlockManifest($manifest);
static setExpectedType($type)
static getPublicationPath()
static getSiteSpecialType(string $siteCode)
static getOperationsForSite(int $siteId)
static getExcludedHooks()
const SCOPE_CODE_KNOWLEDGE
static setScope($scope, array $params=[])
static getScopeClass($scope)
static isPublicScope(?string $scope=null)
const SCOPE_CODE_MAINPAGE
static $currentScopeClass
static getFilterType($strict=false)
const PSEUDO_SCOPE_CODE_FORMS
static getCurrentScopeId()
static prepareBlockManifest(array $manifest)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']