Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
policy.php
1
<?php
8
namespace
Bitrix\Main\UserConsent
;
9
10
use
Bitrix\Main\Context
;
11
use
Bitrix\Main\Localization\Loc
;
12
13
Loc::loadLanguageFile
(__FILE__);
14
19
class
Policy
20
{
22
protected
static
$standardTextForLanguages
= array(
'ru'
,
'ua'
,
'by'
);
23
25
protected
static
$requiredForLanguages
= array(
'ru'
,
'by'
,
'ua'
);
26
33
public
static
function
isRequired
($languageId)
34
{
35
return
in_array($languageId, self::$requiredForLanguages);
36
}
37
44
public
static
function
hasText
($languageId)
45
{
46
return
in_array($languageId, self::$standardTextForLanguages);
47
}
48
54
public
static
function
installDefault
()
55
{
56
$languageId =
Context::getCurrent
()->getLanguage();
57
if
(!self::isRequired($languageId) || !self::hasText($languageId))
58
{
59
return
;
60
}
61
62
63
}
64
}
Bitrix\Main\Context\getCurrent
static getCurrent()
Definition
context.php:241
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadLanguageFile
static loadLanguageFile($file, $language=null, $normalize=true)
Definition
loc.php:224
Bitrix\Main\UserConsent\Policy
Definition
policy.php:20
Bitrix\Main\UserConsent\Policy\isRequired
static isRequired($languageId)
Definition
policy.php:33
Bitrix\Main\UserConsent\Policy\hasText
static hasText($languageId)
Definition
policy.php:44
Bitrix\Main\UserConsent\Policy\$standardTextForLanguages
static $standardTextForLanguages
Definition
policy.php:22
Bitrix\Main\UserConsent\Policy\installDefault
static installDefault()
Definition
policy.php:54
Bitrix\Main\UserConsent\Policy\$requiredForLanguages
static $requiredForLanguages
Definition
policy.php:25
Bitrix\Main\Context
Definition
culture.php:9
Bitrix\Main\UserConsent
Definition
agreement.php:8
modules
main
lib
userconsent
policy.php
Создано системой
1.10.0