Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
storetable.php
1
<?php
9
namespace
Bitrix\Main\Test\Typography
;
10
11
use
Bitrix\Main\ORM\Data\DataManager
;
12
use
Bitrix\Main\ORM\Fields\IntegerField
;
13
use
Bitrix\Main\ORM\Fields\Relations\OneToMany
;
14
use
Bitrix\Main\ORM\Fields\StringField
;
15
34
class
StoreTable
extends
DataManager
35
{
36
public
static
function
getTableName
()
37
{
38
return
'(
39
(SELECT 33 AS ID, "Store 33" AS ADDRESS)
40
UNION
41
(SELECT 34 AS ID, "Store 34" AS ADDRESS)
42
)'
;
43
}
44
45
public
static
function
getMap
()
46
{
47
return
[
48
(
new
IntegerField
(
'ID'
))
49
->configurePrimary()
50
->configureAutocomplete(),
51
52
(
new
StringField
(
'ADDRESS'
)),
53
54
(
new
OneToMany
(
'BOOK_ITEMS'
, StoreBookTable::class,
'STORE'
))
55
];
56
}
57
}
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\OneToMany
Definition
onetomany.php:23
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\Test\Typography\StoreTable
Definition
storetable.php:35
Bitrix\Main\Test\Typography\StoreTable\getMap
static getMap()
Definition
storetable.php:45
Bitrix\Main\Test\Typography\StoreTable\getTableName
static getTableName()
Definition
storetable.php:36
Bitrix\Main\Test\Typography
Definition
authortable.php:9
modules
main
lib
test
typography
storetable.php
Создано системой
1.10.0