Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
publishertable.php
1<?php
10
14
16
35{
36 public static function getTableName()
37 {
38 return '(
39 (SELECT 253 AS ID, "Publisher Title 253" AS TITLE, 2 AS BOOKS_COUNT)
40 UNION
41 (SELECT 254 AS ID, "Publisher Title 254" AS TITLE, 0 AS BOOKS_COUNT)
42 )';
43 }
44
45 public static function getMap()
46 {
47 return [
48 (new IntegerField('ID'))
49 ->configurePrimary()
50 ->configureAutocomplete(),
51
52 (new StringField('TITLE')),
53
54 (new IntegerField('BOOKS_COUNT')),
55
56 (new OneToMany('BOOKS', BookTable::class, 'PUBLISHER'))
57 ->configureJoinType('left')
58 ];
59 }
60
61}