Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
roomcategorytable.php
1
<?php
2
namespace
Bitrix\Calendar\Internals
;
3
4
use
Bitrix\Main\Localization\Loc
;
5
use
Bitrix\Main\ORM\Data\DataManager
;
6
use
Bitrix\Main\ORM\Fields\IntegerField
;
7
use
Bitrix\Main\ORM\Fields\StringField
;
8
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
9
35
class
RoomCategoryTable
extends
DataManager
36
{
42
public
static
function
getTableName
()
43
{
44
return
'b_calendar_room_category'
;
45
}
46
52
public
static
function
getMap
()
53
{
54
return
[
55
(
new
IntegerField
(
'ID'
))
56
->configureTitle(
Loc::getMessage
(
'ROOM_CATEGORY_ENTITY_ID_FIELD'
))
57
->configurePrimary(
true
)
58
->configureAutocomplete(
true
)
59
,
60
(
new
StringField
(
'NAME'
,
61
[
62
'validation'
=> [__CLASS__,
'validateName'
]
63
]
64
))
65
->configureTitle(
Loc::getMessage
(
'ROOM_CATEGORY_ENTITY_NAME_FIELD'
))
66
,
67
];
68
}
69
75
public
static
function
validateName
(): array
76
{
77
return
[
78
new
LengthValidator
(
null
, 255),
79
];
80
}
81
}
Bitrix\Calendar\Internals\RoomCategoryTable
Definition
roomcategorytable.php:36
Bitrix\Calendar\Internals\RoomCategoryTable\getMap
static getMap()
Definition
roomcategorytable.php:52
Bitrix\Calendar\Internals\RoomCategoryTable\validateName
static validateName()
Definition
roomcategorytable.php:75
Bitrix\Calendar\Internals\RoomCategoryTable\getTableName
static getTableName()
Definition
roomcategorytable.php:42
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Calendar\Internals
Definition
access.php:3
modules
calendar
lib
internals
roomcategorytable.php
Создано системой
1.10.0