Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
basketproperties.php
1<?php
3
6Loc::loadMessages(__FILE__);
7
38 extends Main\Entity\DataManager
39{
45 public static function getTableName()
46 {
47 return 'b_sale_basket_props';
48 }
49
55 public static function getMap()
56 {
57 return array(
58 new Main\Entity\IntegerField(
59 'ID',
60 array(
61 'autocomplete' => true,
62 'primary' => true,
63 )
64 ),
65 new Main\Entity\IntegerField(
66 'BASKET_ID',
67 array(
68 'required' => true,
69 )
70 ),
71 new Main\Entity\StringField(
72 'NAME',
73 array(
74 'size' => 255,
75 'validation' => array(__CLASS__, 'validateName'),
76 )
77 ),
78 new Main\Entity\StringField(
79 'VALUE',
80 array(
81 'size' => 255,
82 'validation' => array(__CLASS__, 'validateValue'),
83 )
84 ),
85 new Main\Entity\StringField(
86 'CODE',
87 array(
88 'size' => 255,
89 'validation' => array(__CLASS__, 'validateCode'),
90 )
91 ),
92
93 new Main\Entity\IntegerField(
94 'SORT'
95 ),
96 new Main\Entity\ReferenceField(
97 'BASKET',
98 'Bitrix\Sale\Internals\Basket',
99 array(
100 '=this.BASKET_ID' => 'ref.ID'
101 )
102 ),
103
104 new Main\Entity\StringField(
105 'XML_ID',
106 array(
107 'size' => 255,
108 )
109 ),
110 );
111 }
117 public static function validateName()
118 {
119 return array(
120 new Main\Entity\Validator\Length(null, 255),
121 );
122 }
128 public static function validateValue()
129 {
130 return array(
131 new Main\Entity\Validator\Length(null, 255),
132 );
133 }
139 public static function validateCode()
140 {
141 return array(
142 new Main\Entity\Validator\Length(null, 255),
143 );
144 }
145}
static loadMessages($file)
Definition loc.php:64