Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
grouplang.php
1<?php
2namespace Bitrix\Catalog;
3
6
7Loc::loadMessages(__FILE__);
8
37class GroupLangTable extends Main\Entity\DataManager
38{
44 public static function getTableName()
45 {
46 return 'b_catalog_group_lang';
47 }
48
54 public static function getMap()
55 {
56 return array(
57 'ID' => new Main\Entity\IntegerField('ID', array(
58 'primary' => true,
59 'autocomplete' => true,
60 'title' => Loc::getMessage('GROUP_LANG_ENTITY_ID_FIELD')
61 )),
62 'CATALOG_GROUP_ID' => new Main\Entity\IntegerField('CATALOG_GROUP_ID', array(
63 'title' => Loc::getMessage('GROUP_LANG_ENTITY_CATALOG_GROUP_ID_FIELD')
64 )),
65 'LANG' => new Main\Entity\StringField('LANG', array(
66 'validation' => array(__CLASS__, 'validateLang'),
67 'title' => Loc::getMessage('GROUP_LANG_ENTITY_LANG_FIELD')
68 )),
69 'NAME' => new Main\Entity\StringField('NAME', array(
70 'validation' => array(__CLASS__, 'validateName'),
71 'title' => Loc::getMessage('GROUP_LANG_ENTITY_NAME_FIELD')
72 )),
73 'CATALOG_GROUP' => new Main\Entity\ReferenceField(
74 'CATALOG_GROUP',
75 '\Bitrix\Catalog\Group',
76 array('=this.CATALOG_GROUP_ID' => 'ref.ID')
77 )
78 );
79 }
85 public static function validateLang()
86 {
87 return array(
88 new Main\Entity\Validator\Length(2, 2),
89 );
90 }
96 public static function validateName()
97 {
98 return array(
99 new Main\Entity\Validator\Length(null, 100),
100 );
101 }
102}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29