Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
order.php
1
<?php
2
namespace
Bitrix\Seo\Adv
;
3
4
use
Bitrix\Main\Application
;
5
use
Bitrix\Main\Entity
;
6
use
Bitrix\Main\Type\DateTime
;
7
use
Bitrix\Main\Web\HttpClient
;
8
use
Bitrix\Seo\Engine
;
9
41
class
OrderTable
extends
Entity\DataManager
42
{
43
const
PROCESSED
=
'Y'
;
44
const
NOT_PROCESSED
=
'N'
;
45
51
public
static
function
getTableName
()
52
{
53
return
'b_seo_adv_order'
;
54
}
55
61
public
static
function
getMap
()
62
{
63
return
array(
64
'ID'
=> array(
65
'data_type'
=>
'integer'
,
66
'primary'
=>
true
,
67
'autocomplete'
=>
true
,
68
),
69
'ENGINE_ID'
=> array(
70
'data_type'
=>
'integer'
,
71
'required'
=>
true
,
72
),
73
'TIMESTAMP_X'
=> array(
74
'data_type'
=>
'datetime'
,
75
'required'
=>
true
,
76
),
77
'CAMPAIGN_ID'
=> array(
78
'data_type'
=>
'integer'
,
79
'required'
=>
true
,
80
),
81
'BANNER_ID'
=> array(
82
'data_type'
=>
'integer'
,
83
'required'
=>
true
,
84
),
85
'ORDER_ID'
=> array(
86
'data_type'
=>
'integer'
,
87
'required'
=>
true
,
88
),
89
'SUM'
=> array(
90
'data_type'
=>
'float'
,
91
),
92
'PROCESSED'
=> array(
93
'data_type'
=>
'boolean'
,
94
'values'
=> array(static::NOT_PROCESSED, static::PROCESSED),
95
),
96
'CAMPAIGN'
=> array(
97
'data_type'
=>
'Bitrix\Seo\Adv\YandexCampaignTable'
,
98
'reference'
=> array(
'=this.CAMPAIGN_ID'
=>
'ref.ID'
),
99
),
100
'BANNER'
=> array(
101
'data_type'
=>
'Bitrix\Seo\Adv\YandexBannerTable'
,
102
'reference'
=> array(
'=this.BANNER_ID'
=>
'ref.ID'
),
103
),
104
'ORDER'
=> array(
105
'data_type'
=>
'Bitrix\Sale\OrderTable'
,
106
'reference'
=> array(
'=this.ORDER_ID'
=>
'ref.ID'
),
107
)
108
);
109
}
110
111
public
static
function
onBeforeAdd
(
Entity
\
Event
$event)
112
{
113
$result =
new
Entity\EventResult();
114
$result->modifyFields(array(
"TIMESTAMP_X"
=>
new
DateTime
()));
115
return
$result;
116
}
117
}
Bitrix\Main\Application
Definition
application.php:28
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Main\Web\HttpClient
Definition
httpclient.php:24
Bitrix\Seo\Adv\OrderTable
Definition
order.php:42
Bitrix\Seo\Adv\OrderTable\PROCESSED
const PROCESSED
Definition
order.php:43
Bitrix\Seo\Adv\OrderTable\getMap
static getMap()
Definition
order.php:61
Bitrix\Seo\Adv\OrderTable\NOT_PROCESSED
const NOT_PROCESSED
Definition
order.php:44
Bitrix\Seo\Adv\OrderTable\onBeforeAdd
static onBeforeAdd(Entity\Event $event)
Definition
order.php:111
Bitrix\Seo\Adv\OrderTable\getTableName
static getTableName()
Definition
order.php:51
Bitrix\Seo\Adv
Definition
auto.php:2
Bitrix\Seo\Engine
Definition
bitrix.php:9
modules
seo
lib
adv
order.php
Создано системой
1.10.0