1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
cookies.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Controller;
3
4
use \Bitrix\Main\Engine\Controller;
5
6
class
Cookies
extends
Controller
7
{
8
public
function
getDefaultPreFilters
()
9
{
10
return
[];
11
}
12
18
public
function
getAgreementsAction
(
int
$siteId
):
array
19
{
20
$mainAgreement =
\Bitrix\Landing\Site\Cookies::getMainAgreement
(
21
\
Bitrix
\
Landing
\
Hook
\
Page
\
Cookies::getAgreementIdBySiteId
(
$siteId
)
22
);
23
$agreements =
\Bitrix\Landing\Site\Cookies::getAgreements
(
$siteId
,
true
);
24
25
$data
= [
26
'main'
=> $mainAgreement,
27
'analytic'
=> array_filter($agreements,
function
($item)
28
{
29
return
$item[
'ACTIVE'
] ==
'Y'
&& $item[
'TYPE'
] ==
'analytic'
;
30
}),
31
'technical'
=> array_filter($agreements,
function
($item)
32
{
33
return
$item[
'ACTIVE'
] ==
'Y'
&& $item[
'TYPE'
] ==
'technical'
;
34
}),
35
'other'
=> array_filter($agreements,
function
($item)
36
{
37
return
$item[
'ACTIVE'
] ==
'Y'
&& $item[
'TYPE'
] ==
'other'
;
38
})
39
];
40
41
foreach
(
$data
as
$key
=>
$val
)
42
{
43
if
(!
$val
)
44
{
45
unset(
$data
[
$key
]);
46
}
47
}
48
49
return
$data
;
50
}
51
58
public
function
acceptAgreementsAction
(
int
$siteId
,
array
$accepted = []): void
59
{
60
\Bitrix\Landing\Site\Cookies::acceptAgreement
(
$siteId
, $accepted);
61
}
62
}
Bitrix\Landing\Controller\Cookies
Определения
cookies.php:7
Bitrix\Landing\Controller\Cookies\acceptAgreementsAction
acceptAgreementsAction(int $siteId, array $accepted=[])
Определения
cookies.php:58
Bitrix\Landing\Controller\Cookies\getDefaultPreFilters
getDefaultPreFilters()
Определения
cookies.php:8
Bitrix\Landing\Controller\Cookies\getAgreementsAction
getAgreementsAction(int $siteId)
Определения
cookies.php:18
Bitrix\Landing\Hook\Page\Cookies\getAgreementIdBySiteId
static getAgreementIdBySiteId(int $siteId)
Определения
cookies.php:214
Bitrix\Landing\Site\Cookies\getMainAgreement
static getMainAgreement(?int $agreementId=null)
Определения
cookies.php:45
Bitrix\Landing\Site\Cookies\getAgreements
static getAgreements(int $siteId, bool $viewMode=false)
Определения
cookies.php:125
Bitrix\Landing\Site\Cookies\acceptAgreement
static acceptAgreement(int $siteId, array $accepted=[])
Определения
cookies.php:283
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$siteId
$siteId
Определения
ajax.php:8
Bitrix\Landing\Hook
Определения
page.php:2
Bitrix\Landing
Определения
agent.php:3
Bitrix\Main\Controller
Определения
agreement.php:2
Bitrix\Main\Page
Определения
aliases.php:54
Bitrix
$key
if(empty($signedUserToken)) $key
Определения
quickway.php:257
$val
$val
Определения
options.php:1793
bitrix
modules
landing
lib
controller
cookies.php
Создано системой
1.14.0