Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
autolog.php
1<?php
2namespace Bitrix\Seo\Adv;
3
7
8Loc::loadMessages(__FILE__);
9
42class AutologTable extends Entity\DataManager
43{
46
47 const SUCCESS = 'Y';
48 const FAILURE = 'N';
49
55 public static function getTableName()
56 {
57 return 'b_seo_adv_autolog';
58 }
59
65 public static function getMap()
66 {
67 return array(
68 'ID' => array(
69 'data_type' => 'integer',
70 'primary' => true,
71 'autocomplete' => true,
72 ),
73 'ENGINE_ID' => array(
74 'data_type' => 'integer',
75 'required' => true,
76 ),
77 'TIMESTAMP_X' => array(
78 'data_type' => 'datetime',
79 'required' => true,
80 ),
81 'CAMPAIGN_ID' => array(
82 'data_type' => 'integer',
83 'required' => true,
84 ),
85 'CAMPAIGN_XML_ID' => array(
86 'data_type' => 'string',
87 'required' => true,
88 ),
89 'BANNER_ID' => array(
90 'data_type' => 'integer',
91 'required' => true,
92 'title' => Loc::getMessage('ADV_AUTOLOG_ENTITY_BANNER_ID_FIELD'),
93 ),
94 'BANNER_XML_ID' => array(
95 'data_type' => 'string',
96 'required' => true,
97 ),
98 'CAUSE_CODE' => array(
99 'data_type' => 'integer',
100 ),
101 'SUCCESS' => array(
102 'data_type' => 'boolean',
103 'values' => array(static::FAILURE, static::SUCCESS),
104 ),
105 );
106 }
107
108 public static function onBeforeAdd(Entity\Event $event)
109 {
110 $result = new Entity\EventResult();
111 $result->modifyFields(array("TIMESTAMP_X" => new DateTime()));
112 return $result;
113 }
114}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
static onBeforeAdd(Entity\Event $event)
Definition autolog.php:108