Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
locationfieldtable.php
1
<?php
2
3
namespace
Bitrix\Location\Model
;
4
5
use
Bitrix\Main
;
6
use
Bitrix\Main\ORM\Fields
;
7
use
Bitrix\Main\ORM\Query\Join
;
8
25
class
LocationFieldTable
extends
Main\ORM\Data\DataManager
26
{
32
public
static
function
getTableName
()
33
{
34
return
'b_location_field'
;
35
}
36
42
public
static
function
getMap
()
43
{
44
return
[
45
46
(
new
Fields\IntegerField(
'LOCATION_ID'
))
47
->configureRequired(
true
)
48
->configurePrimary(
true
),
49
50
(
new
Fields\IntegerField(
'TYPE'
))
51
->configureRequired(
true
)
52
->configurePrimary(
true
),
53
54
(
new
Fields\StringField(
'VALUE'
))
55
->addValidator(
new
Main\ORM\Fields\Validators\
LengthValidator
(
null
, 255)),
56
57
// Ref
58
59
(
new
Fields\Relations\
Reference
(
'LOCATION'
, LocationTable::class,
60
Join::on(
'this.LOCATION_ID'
,
'ref.ID'
)))
61
->configureJoinType(
'inner'
)
62
];
63
}
64
65
public
static
function
deleteByLocationId
(
int
$locationId)
66
{
67
Main\Application::getConnection()->queryExecute(
"
68
DELETE
69
FROM "
.self::getTableName().
"
70
WHERE
71
LOCATION_ID="
.(
int
)$locationId
72
);
73
}
74
}
Bitrix\Location\Model\LocationFieldTable
Definition
locationfieldtable.php:26
Bitrix\Location\Model\LocationFieldTable\getMap
static getMap()
Definition
locationfieldtable.php:42
Bitrix\Location\Model\LocationFieldTable\deleteByLocationId
static deleteByLocationId(int $locationId)
Definition
locationfieldtable.php:65
Bitrix\Location\Model\LocationFieldTable\getTableName
static getTableName()
Definition
locationfieldtable.php:32
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\Relations\Reference
Definition
reference.php:26
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\ORM\Query\Join
Definition
join.php:19
Bitrix\Location\Model
Definition
addressfieldtable.php:3
Bitrix\Main\ORM\Fields
Definition
arrayfield.php:9
Bitrix\Main
modules
location
lib
model
locationfieldtable.php
Создано системой
1.10.0