1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
locationnametable.php
См. документацию.
1
<?php
2
namespace
Bitrix\Location\Model;
3
4
use Bitrix\Main;
5
use Bitrix\Main\Application;
6
use Bitrix\Main\ORM\Fields\Relations\Reference;
7
use Bitrix\Main\ORM\Query\Join;
8
use Bitrix\Main\ORM\Fields;
9
27
class
LocationNameTable
extends
Main\ORM\Data\DataManager
28
{
34
public
static
function
getTableName
()
35
{
36
return
'b_location_name'
;
37
}
38
44
public
static
function
getMap
()
45
{
46
return
[
47
(
new
Fields\IntegerField
(
'LOCATION_ID'
))
48
->configurePrimary(
true
)
49
->configureRequired(
true
),
50
51
(
new
Fields\StringField
(
'LANGUAGE_ID'
))
52
->configurePrimary(
true
)
53
->configureRequired(
true
)
54
->addValidator(
new
Main
\
ORM
\
Fields
\
Validators
\
LengthValidator
(2, 2)),
55
56
(
new
Fields\StringField
(
'NAME'
))
57
->configureRequired(
true
)
58
->addValidator(
new
Main
\
ORM
\
Fields
\
Validators
\
LengthValidator
(1, 1000)),
59
60
(
new
Fields\StringField
(
'NAME_NORMALIZED'
))
61
->addValidator(
new
Main
\
ORM
\
Fields
\
Validators
\
LengthValidator
(
null
, 1000)),
62
63
// Ref
64
65
(
new
Reference
(
'LOCATION'
, LocationTable::class,
66
Join::on(
'this.LOCATION_ID'
,
'ref.ID'
)))
67
->configureJoinType(
'inner'
)
68
];
69
}
70
75
public
static
function
deleteByLocationId
(
int
$locationId)
76
{
77
Application::getConnection()->queryExecute(
"
78
DELETE
79
FROM "
.self::getTableName().
"
80
WHERE LOCATION_ID="
.(
int
)$locationId
81
);
82
}
83
}
Bitrix\Location\Model\LocationNameTable
Определения
locationnametable.php:28
Bitrix\Location\Model\LocationNameTable\getMap
static getMap()
Определения
locationnametable.php:44
Bitrix\Location\Model\LocationNameTable\deleteByLocationId
static deleteByLocationId(int $locationId)
Определения
locationnametable.php:75
Bitrix\Location\Model\LocationNameTable\getTableName
static getTableName()
Определения
locationnametable.php:34
Bitrix\Main\ORM\Data\DataManager
Определения
datamanager.php:35
Bitrix\Main\ORM\Fields\IntegerField
Определения
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\Reference
Определения
reference.php:26
Bitrix\Main\ORM\Fields\StringField
Определения
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Определения
lengthvalidator.php:19
Bitrix\Main\ORM\Fields\Validators
Определения
booleanvalidator.php:9
Bitrix\Main\ORM\Fields
Определения
arrayfield.php:9
Bitrix\Main\ORM
Bitrix\Main
bitrix
modules
location
lib
model
locationnametable.php
Создано системой
1.14.0