1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
consentinstaller.php
См. документацию.
1<?php
2
4
5
9Loc::loadMessages(__FILE__);
10
12{
13 public static function run(string $lang): string
14 {
15 self::createConsent('sender_approve_confirmation_', $lang);
16
17 return '';
18 }
19
20 private static function createConsent(string $code, string $lang)
21 {
22 $preparedCode = $code.$lang;
23 $existed = AgreementTable::getList(array(
24 'select' => ['ID'],
25 'filter' => [
26 '=CODE' => $preparedCode,
27 '=LANGUAGE_ID' => $lang,
28 ],
29 'limit' => 1
30 ));
31
32
33 if ($existed->fetch())
34 {
35 return '';
36 }
37
38 $title = Loc::getMessage($code.'title', null, $lang);
39 if (!$title)
40 {
41 return '\\Bitrix\\Sender\\Preset\\Consent\\ConsentInstaller::run(\''.$lang.'\')';
42 }
43
44 AgreementTable::add(array(
45 "CODE" => $preparedCode,
46 "NAME" => $title,
47 "TYPE" => Agreement::TYPE_CUSTOM,
48 "LANGUAGE_ID" => $lang,
49 "AGREEMENT_TEXT" => Loc::getMessage($code . 'text',null, $lang),
50 "LABEL_TEXT" => Loc::getMessage($code . 'label', null, $lang),
51 ));
52 }
53}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
if(!defined('SITE_ID')) $lang
Определения include.php:91
$title
Определения pdf.php:123