Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
elementv2table.php
1<?php
9namespace Bitrix\Iblock\ORM;
10
14
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}
getParameter($key)
Definition event.php:80