1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
status.php
См. документацию.
1<?php
8namespace Bitrix\Sale\Internals;
9
10use Bitrix\Main;
11use Bitrix\Main\Localization\Loc;
12
29class StatusTable extends Main\Entity\DataManager
30{
31 public const TYPE_ORDER = 'O';
32 public const TYPE_SHIPMENT = 'D';
33
34 public static function getTableName()
35 {
36 return 'b_sale_status';
37 }
38
39 public static function getMap()
40 {
41 return array(
42
43 new Main\Entity\StringField('ID', array(
44 'primary' => true,
45 'validation' => function()
46 {
47 return array(
48 new Main\Entity\Validator\RegExp('/^[A-Za-z]{1,2}$/'),
49 new Main\Entity\Validator\Unique,
50 );
51 },
52 'title' => Loc::getMessage('B_SALE_STATUS_ID'),
53 )),
54
55 new Main\Entity\BooleanField('TYPE', array(
56 'default_value' => self::TYPE_ORDER,
57 'values' => array(self::TYPE_ORDER, self::TYPE_SHIPMENT),
58 'title' => Loc::getMessage('B_SALE_STATUS_TYPE'),
59 )),
60
61 new Main\Entity\IntegerField('SORT', array(
62 'default_value' => 100,
63 'format' => '/^[0-9]{1,11}$/',
64 'title' => Loc::getMessage('B_SALE_STATUS_SORT'),
65 )),
66
67 new Main\Entity\BooleanField('NOTIFY', array(
68 'default_value' => 'Y',
69 'values' => array('N', 'Y'),
70 'title' => Loc::getMessage('B_SALE_STATUS_NOTIFY'),
71 )),
72
73 new Main\Entity\StringField('COLOR', array(
74 'title' => Loc::getMessage('B_SALE_STATUS_COLOR'),
75 )),
76
77 new Main\Entity\StringField('XML_ID', array(
78 'title' => Loc::getMessage('B_SALE_STATUS_XML_ID'),
79 )),
80
82 'STATUS_LANG',
83 StatusLangTable::class,
84 Main\ORM\Query\Join::on('this.ID', 'ref.STATUS_ID'),
85 array('join_type' => 'left')
86 )
87 );
88 }
89
99 public static function update($primary, array $data)
100 {
101 $result = parent::update($primary, $data);
102 if (Main\Config\Option::get('sale', 'expiration_processing_events', 'N') === 'Y')
103 {
104 foreach (GetModuleEvents("sale", "OnStatusUpdate", true) as $event)
105 {
107 }
108 }
109
110 return $result;
111 }
112
121 public static function add(array $data)
122 {
123 $result = parent::add($data);
124 if (Main\Config\Option::get('sale', 'expiration_processing_events', 'N') === 'Y')
125 {
126 $id = $result->getId();
127 foreach (GetModuleEvents("sale", "OnStatusAdd", true) as $event)
128 {
130 }
131 }
132
133 return $result;
134 }
135
139 public static function generateXmlId()
140 {
141 return uniqid('bx_');
142 }
143}
static getMap()
Определения status.php:39
const TYPE_ORDER
Определения status.php:31
static add(array $data)
Определения status.php:121
static generateXmlId()
Определения status.php:139
const TYPE_SHIPMENT
Определения status.php:32
static update($primary, array $data)
Определения status.php:99
static getTableName()
Определения status.php:34
$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
ExecuteModuleEventEx($arEvent, $arParams=[])
Определения tools.php:5214
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
Определения tools.php:5177
Определения ufield.php:9
Определения chain.php:3
$event
Определения prolog_after.php:141