Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
elementv2table.php
1
<?php
9
namespace
Bitrix\Iblock\ORM
;
10
11
use
Bitrix\Main\ORM\Event
;
12
use
Bitrix\Main\ORM\Objectify\Collection
;
13
use
Bitrix\Main\ORM\Objectify\EntityObject
;
14
34
class
ElementV2Table
extends
CommonElementTable
35
{
36
public
static
function
getEntityClass
()
37
{
38
return
ElementV2Entity::class;
39
}
40
41
public
static
function
getObjectParentClass
()
42
{
43
return
ElementV2::class;
44
}
45
50
public
static
function
getObjectClass
()
51
{
52
return
static::getObjectClassByDataClass(get_called_class());
53
}
54
59
public
static
function
getCollectionClass
()
60
{
61
return
static::getCollectionClassByDataClass(get_called_class());
62
}
63
64
public
static
function
onAfterAdd
(
Event
$event)
65
{
66
parent::onAfterAdd($event);
67
68
$id = $event->
getParameter
(
'id'
);
69
$table = static::getEntity()->getSingleValueTableName();
70
$connection = static::getEntity()->getConnection();
71
72
// create single value row
73
$connection->add($table, [
'IBLOCK_ELEMENT_ID'
=> $id]);
74
}
75
}
Bitrix\Iblock\ORM\CommonElementTable
Definition
commonelementtable.php:29
Bitrix\Iblock\ORM\ElementV2Table
Definition
elementv2table.php:35
Bitrix\Iblock\ORM\ElementV2Table\getObjectParentClass
static getObjectParentClass()
Definition
elementv2table.php:41
Bitrix\Iblock\ORM\ElementV2Table\onAfterAdd
static onAfterAdd(Event $event)
Definition
elementv2table.php:64
Bitrix\Iblock\ORM\ElementV2Table\getEntityClass
static getEntityClass()
Definition
elementv2table.php:36
Bitrix\Iblock\ORM\ElementV2Table\getObjectClass
static getObjectClass()
Definition
elementv2table.php:50
Bitrix\Iblock\ORM\ElementV2Table\getCollectionClass
static getCollectionClass()
Definition
elementv2table.php:59
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\Event\getParameter
getParameter($key)
Definition
event.php:80
Bitrix\Main\ORM\Event
Definition
event.php:16
Bitrix\Main\ORM\Objectify\Collection
Definition
collection.php:33
Bitrix\Main\ORM\Objectify\EntityObject
Definition
entityobject.php:51
Bitrix\Iblock\ORM
Definition
commonelement.php:9
modules
iblock
lib
orm
elementv2table.php
Создано системой
1.10.0