Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
highloadblocklangtable.php
1<?php
3
5
22class HighloadBlockLangTable extends Entity\DataManager
23{
28 public static function getTableName()
29 {
30 return 'b_hlblock_entity_lang';
31 }
32
37 public static function getMap()
38 {
39 return array(
40 'ID' => new Entity\IntegerField('ID', array(
41 'primary' => true
42 )),
43 'LID' => new Entity\StringField('LID', array(
44 'primary' => true,
45 'required' => true,
46 'validation' => array(__CLASS__, 'validateLid'),
47 )),
48 'NAME' => new Entity\StringField('NAME', array(
49 'required' => true,
50 'validation' => array(__CLASS__, 'validateName'),
51 )),
52 );
53 }
54
60 public static function validateLid()
61 {
62 return array(
63 new Entity\Validator\Length(null, 2),
64 );
65 }
66
72 public static function validateName()
73 {
74 return array(
75 new Entity\Validator\Length(null, 100),
76 );
77 }
78}