1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
knowledge.php
См. документацию.
1<?php
2namespace Bitrix\Landing\Restriction;
3
4use \Bitrix\Bitrix24\Feature;
5use \Bitrix\Landing\Site;
6use \Bitrix\Landing\Site\Type;
7
9{
16 public static function isViewAllowed(string $code, array $params): bool
17 {
18 if (!\Bitrix\Main\Loader::includeModule('bitrix24'))
19 {
20 return true;
21 }
22
23 if (Site\Type::getCurrentScopeId() != Type::SCOPE_CODE_KNOWLEDGE)
24 {
25 return true;
26 }
27
28 $availableCount = Feature::getVariable(
29 'landing_site_knowledge'
30 );
31 if ($availableCount)
32 {
33 if (!isset($params['ID']) || $params['ID'] <= 0)
34 {
35 return false;
36 }
37 $allowedSiteIds = [];
38 $res = Site::getList([
39 'select' => [
40 'ID'
41 ],
42 'order' => [
43 'ID' => 'asc'
44 ],
45 'limit' => $availableCount
46 ]);
47 while ($row = $res->fetch())
48 {
49 $allowedSiteIds[] = $row['ID'];
50 }
51 return in_array((int)$params['ID'], $allowedSiteIds);
52 }
53
54 return true;
55 }
56
61 public static function isAllowedInGroup(): bool
62 {
63 if (\Bitrix\Main\Loader::includeModule('bitrix24'))
64 {
65 return Feature::isFeatureEnabled('landing_knowledge_group');
66 }
67
68 return true;
69 }
70}
static isViewAllowed(string $code, array $params)
Определения knowledge.php:16
static isAllowedInGroup()
Определения knowledge.php:61
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
Определения cookies.php:2
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799