Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
sectionpropertytable.php
1<?php
2namespace Bitrix\Iblock;
3
6
40class SectionPropertyTable extends Entity\DataManager
41{
42 //ABCDE - for numbers
43 public const NUMBERS_WITH_SLIDER = 'A';
44 public const NUMBERS = 'B';
45 //FGHIJ - for checkboxes
46 public const CHECKBOXES = 'F';
47 public const CHECKBOXES_WITH_PICTURES = 'G';
49 //KLMNO - for radio buttons
50 public const RADIO_BUTTONS = 'K';
51 //PQRST - for drop down
52 public const DROPDOWN = 'P';
54 //UWXYZ - reserved
55 public const CALENDAR = 'U';
56
62 public static function getTableName(): string
63 {
64 return 'b_iblock_section_property';
65 }
66
72 public static function getMap(): array
73 {
74 return array(
75 'IBLOCK_ID' => array(
76 'data_type' => 'integer',
77 'primary' => true,
78 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_IBLOCK_ID_FIELD'),
79 ),
80 'SECTION_ID' => array(
81 'data_type' => 'integer',
82 'primary' => true,
83 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_SECTION_ID_FIELD'),
84 ),
85 'PROPERTY_ID' => array(
86 'data_type' => 'integer',
87 'primary' => true,
88 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_PROPERTY_ID_FIELD'),
89 ),
90 'SMART_FILTER' => array(
91 'data_type' => 'boolean',
92 'values' => array('N', 'Y'),
93 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_SMART_FILTER_FIELD'),
94 ),
95 'DISPLAY_TYPE' => array(
96 'data_type' => 'enum',
97 'values' => array(
98 self::NUMBERS_WITH_SLIDER,
99 self::NUMBERS,
100 self::CHECKBOXES,
101 self::CHECKBOXES_WITH_PICTURES,
102 self::CHECKBOXES_WITH_PICTURES_AND_LABELS,
103 self::RADIO_BUTTONS,
104 self::DROPDOWN,
105 self::DROPDOWN_WITH_PICTURES_AND_LABELS,
106 self::CALENDAR
107 ),
108 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_DISPLAY_TYPE_FIELD'),
109 ),
110 'DISPLAY_EXPANDED' => array(
111 'data_type' => 'boolean',
112 'values' => array('N', 'Y'),
113 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_DISPLAY_EXPANDED_FIELD'),
114 ),
115 'FILTER_HINT' => array(
116 'data_type' => 'string',
117 'title' => Loc::getMessage('IBLOCK_SECTION_PROPERTY_ENTITY_FILTER_HINT_FIELD'),
118 'validation' => array(__CLASS__, 'validateFilterHint'),
119 ),
120 'IBLOCK' => array(
121 'data_type' => 'Bitrix\Iblock\Iblock',
122 'reference' => array('=this.IBLOCK_ID' => 'ref.ID'),
123 ),
124 'PROPERTY' => array(
125 'data_type' => 'Bitrix\Iblock\Property',
126 'reference' => array('=this.PROPERTY_ID' => 'ref.ID'),
127 ),
128 'SECTION' => array(
129 'data_type' => 'Bitrix\Iblock\Section',
130 'reference' => array('=this.SECTION_ID' => 'ref.ID'),
131 ),
132 );
133 }
134
140 public static function validateFilterHint(): array
141 {
142 return array(
143 new Entity\Validator\Length(null, 255),
144 );
145 }
146}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29