1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
agreement.php
См. документацию.
1<?php
9
18
19Loc::loadMessages(__FILE__);
20
38{
44 public static function getTableName()
45 {
46 return 'b_consent_agreement';
47 }
48
54 public static function getMap()
55 {
56 return array(
57 'ID' => array(
58 'data_type' => 'integer',
59 'primary' => true,
60 'autocomplete' => true,
61 ),
62 'CODE' => array(
63 'data_type' => 'string',
64 ),
65 'DATE_INSERT' => array(
66 'data_type' => 'datetime',
67 'required' => true,
68 'default_value' => new DateTime(),
69 ),
70 'ACTIVE' => array(
71 'data_type' => 'boolean',
72 'required' => true,
73 'default_value' => Agreement::ACTIVE,
75 ),
76 'NAME' => array(
77 'data_type' => 'string',
78 'required' => true,
79 'title' => Loc::getMessage('MAIN_USER_CONSENT_TBL_AGREEMENT_FIELD_TITLE_NAME'),
80 ),
81 'TYPE' => array(
82 'data_type' => 'string',
83 'required' => true,
84 'default_value' => Agreement::TYPE_STANDARD,
86 ),
87 'LANGUAGE_ID' => array(
88 'data_type' => 'string',
89 ),
90 'DATA_PROVIDER' => array(
91 'data_type' => 'string',
92 ),
93 'AGREEMENT_TEXT' => array(
94 'data_type' => 'text',
95 ),
96 'LABEL_TEXT' => array(
97 'data_type' => 'string',
98 ),
99 'SECURITY_CODE' => array(
100 'data_type' => 'string',
101 'default_value' => function()
102 {
103 return Random::getString(6);
104 }
105 ),
106 'USE_URL' => [
107 'data_type' => 'boolean',
108 'default_value' => 'N',
109 'values' => ['Y', 'N']
110 ],
111 'URL' => [
112 'data_type' => 'string',
113 ],
114 'IS_AGREEMENT_TEXT_HTML' => [
115 'data_type' => 'boolean',
116 'default_value' => 'N',
117 'values' => ['Y', 'N']
118 ],
119 );
120 }
121
128 public static function onAfterDelete(Event $event)
129 {
130 $result = new EventResult;
131 $data = $event->getParameters();
132
133 $sql = "DELETE FROM " . ConsentTable::getTableName() . " WHERE AGREEMENT_ID = " . intval($data['primary']['ID']);
134 Application::getConnection()->query($sql);
135
136 return $result;
137 }
138}
static getConnection($name="")
Определения application.php:638
Определения event.php:5
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$event
Определения prolog_after.php:141