Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
propertyenumeration.php
1<?php
2namespace Bitrix\Iblock;
3
6Loc::loadMessages(__FILE__);
7
39class PropertyEnumerationTable extends Entity\DataManager
40{
46 public static function getTableName()
47 {
48 return 'b_iblock_property_enum';
49 }
50
56 public static function getMap()
57 {
58 return array(
59 'ID' => array(
60 'data_type' => 'integer',
61 'primary' => true,
62 'autocomplete' => true,
63 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_ID_FIELD'),
64 ),
65 'PROPERTY_ID' => array(
66 'data_type' => 'integer',
67 'primary' => true,
68 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_PROPERTY_ID_FIELD'),
69 ),
70 'VALUE' => array(
71 'data_type' => 'string',
72 'required' => true,
73 'validation' => array(__CLASS__, 'validateValue'),
74 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_VALUE_FIELD'),
75 ),
76 'DEF' => array(
77 'data_type' => 'boolean',
78 'values' => array('N', 'Y'),
79 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_DEF_FIELD'),
80 ),
81 'SORT' => array(
82 'data_type' => 'integer',
83 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_SORT_FIELD'),
84 ),
85 'XML_ID' => array(
86 'data_type' => 'string',
87 'validation' => array(__CLASS__, 'validateXmlId'),
88 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_XML_ID_FIELD'),
89 ),
90 'TMP_ID' => array(
91 'data_type' => 'string',
92 'validation' => array(__CLASS__, 'validateTmpId'),
93 'title' => Loc::getMessage('IBLOCK_PROPERTY_ENUM_ENTITY_TMP_ID_FIELD'),
94 ),
95 'PROPERTY' => array(
96 'data_type' => 'Bitrix\Iblock\Property',
97 'reference' => array('=this.PROPERTY_ID' => 'ref.ID'),
98 ),
99 );
100 }
101
107 public static function validateValue()
108 {
109 return array(
110 new Entity\Validator\Length(null, 255),
111 );
112 }
113
119 public static function validateXmlId()
120 {
121 return array(
122 new Entity\Validator\Unique(),
123 new Entity\Validator\Length(null, 200),
124 );
125 }
126
132 public static function validateTmpId()
133 {
134 return array(
135 new Entity\Validator\Length(null, 40),
136 );
137 }
138}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29