TriggerAppTable::createCollection()
Класс: \Bitrix\Crm\Automation\Trigger\Entity\TriggerAppTable
Сигнатура
public static createCollection() : EO_TriggerApp_Collection
Возвращаемое значение
EO_TriggerApp_Collection
Как применяется в TriggerAppTable
TriggerAppTable::createCollection() — метод класса \Bitrix\Crm\Automation\Trigger\Entity\TriggerAppTable модуля «CRM». Это ORM-сущность D7 (наследник DataManager): строки читаются как объекты EO_TriggerApp, наборы — как EO_TriggerApp_Collection. Метод достаётся TriggerAppTable от DataManager::createCollection: поведение общее для всех сущностей, а данные, поля и классы — свои.
Пустая коллекция объектов TriggerAppTable. В неё складывают объекты и сохраняют разом.
use Bitrix\Main\Loader;
use Bitrix\Crm\Automation\Trigger\Entity\TriggerAppTable;
Loader::includeModule('crm');
$collection = TriggerAppTable::createCollection();
$collection->add(TriggerAppTable::createObject());
$collection->save();Другие методы TriggerAppTable
createObject()getById()getByPrimary()getEntity()getList()getMap()Возвращает карту полей таблицы.getTableName()Возвращает имя таблицы.query()wakeUpCollection()wakeUpObject()
createCollection() есть и у других классов модуля «CRM»: BankDetailTable, ContactCompanyTable, CustomTypeTable, DealContactTable, DealSumStatisticsTable, EntityConfigTable, EntityContactTable, InvoiceSumStatisticsTable.
Исходный файл: source/crm/lib/automation/trigger/entity/triggerapp.php

