1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
landing.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Restriction;
3
4
use \Bitrix\Bitrix24\Feature;
5
use \Bitrix\Main\Entity;
6
7
class
Landing
8
{
15
public
static
function
isCreatingAllowed
(
string
$code
,
array
$params
): bool
16
{
17
if
(!\
Bitrix
\
Main
\Loader::includeModule(
'bitrix24'
))
18
{
19
return
true
;
20
}
21
22
$optPrefix =
'landing_page_'
;
23
$optSuffix = (
$params
[
'action_type'
] ==
'publication'
) ?
'_publication'
:
''
;
24
$variableCode = $optPrefix . strtolower(
$params
[
'type'
]) . $optSuffix;
25
$limit = (int) Feature::getVariable($variableCode);
26
27
if
($limit)
28
{
29
$filter
= [
30
'CHECK_PERMISSIONS'
=>
'N'
,
31
'=SITE.TYPE'
=>
$params
[
'type'
],
32
'!=SITE.SPECIAL'
=>
'Y'
33
];
34
if
(
$params
[
'action_type'
] ==
'publication'
)
35
{
36
$filter
[
'=ACTIVE'
] =
'Y'
;
37
}
38
if
(
39
isset(
$params
[
'filter'
]) &&
40
is_array(
$params
[
'filter'
])
41
)
42
{
43
$filter
= array_merge(
44
$filter
,
45
$params
[
'filter'
]
46
);
47
}
48
$check =
\Bitrix\Landing\Landing::getList
([
49
'select'
=> [
50
'CNT'
=>
new
Entity
\
ExpressionField
(
'CNT'
,
'COUNT(*)'
)
51
],
52
'filter'
=>
$filter
,
53
'group'
=> []
54
])->fetch();
55
if
($check && $check[
'CNT'
] >= $limit)
56
{
57
return
false
;
58
}
59
}
60
61
return
true
;
62
}
63
}
Bitrix\Landing\Restriction\Landing\isCreatingAllowed
static isCreatingAllowed(string $code, array $params)
Определения
landing.php:15
Bitrix\Main\ORM\Data\DataManager\getList
static getList(array $parameters=array())
Определения
datamanager.php:431
Bitrix\Main\ORM\Fields\ExpressionField
Определения
expressionfield.php:25
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$filter
$filter
Определения
iblock_catalog_list.php:54
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Landing
Определения
agent.php:3
Bitrix\Main\Entity
Определения
ufield.php:9
Bitrix\Main
Bitrix
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
landing
lib
restriction
landing.php
Создано системой
1.14.0