Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
type.php
1<?php
3
6
34class TypeTable extends Main\Entity\DataManager
35{
41 public static function getTableName()
42 {
43 return 'b_calendar_type';
44 }
45
51 public static function getMap()
52 {
53 return array(
54 'XML_ID' => array(
55 'data_type' => 'string',
56 'primary' => true,
57 'validation' => array(__CLASS__, 'validateXmlId'),
58 'title' => Loc::getMessage('TYPE_ENTITY_XML_ID_FIELD'),
59 ),
60 'NAME' => array(
61 'data_type' => 'string',
62 'validation' => array(__CLASS__, 'validateName'),
63 'title' => Loc::getMessage('TYPE_ENTITY_NAME_FIELD'),
64 ),
65 'DESCRIPTION' => array(
66 'data_type' => 'text',
67 'title' => Loc::getMessage('TYPE_ENTITY_DESCRIPTION_FIELD'),
68 ),
69 'EXTERNAL_ID' => array(
70 'data_type' => 'string',
71 'validation' => array(__CLASS__, 'validateExternalId'),
72 'title' => Loc::getMessage('TYPE_ENTITY_EXTERNAL_ID_FIELD'),
73 ),
74 'ACTIVE' => array(
75 'data_type' => 'boolean',
76 'values' => array('N', 'Y'),
77 'title' => Loc::getMessage('TYPE_ENTITY_ACTIVE_FIELD'),
78 ),
79 );
80 }
86 public static function validateXmlId()
87 {
88 return array(
89 new Main\Entity\Validator\Length(null, 255),
90 );
91 }
97 public static function validateName()
98 {
99 return array(
100 new Main\Entity\Validator\Length(null, 255),
101 );
102 }
108 public static function validateExternalId()
109 {
110 return array(
111 new Main\Entity\Validator\Length(null, 100),
112 );
113 }
114}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29