...Человеческий поиск в разработке...
- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/core/mappers/event.php
- Класс: BitrixCalendarCoreMappersEvent
- Вызов: Event::getEntity
public function getEntity(int $id, ?array $additionalParams = null): ?CoreEventEvent { $eventDM = EventTable::query() ->where('ID', $id) ; if ($additionalParams) { //filter if (isset($additionalParams['filter']) && is_iterable($additionalParams['filter']) ) { foreach ($additionalParams['filter'] as $filter) { $eventDM->addFilter($filter['key'], $filter['value']); } } //select if (isset($additionalParams['fields']) && is_array($additionalParams['fields']) ) { $eventDM->setSelect($additionalParams['fields']); } else { $eventDM->setSelect(['*']); } } else { $eventDM->setSelect(['*']); } $event = $eventDM->exec()->fetchObject(); return $event ? (new CoreBuildersEventBuilderFromEntityObject($event))->build() : null ; }