• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/rooms/util/cleanlocationeventsagent.php
  • Класс: BitrixCalendarRoomsUtilCleanLocationEventsAgent
  • Вызов: CleanLocationEventsAgent::getEmptyLocationEvents
private function getEmptyLocationEvents(): array
{
	return EventTable::query()
		->setSelect(['ID'])
		->registerRuntimeField(
			new ReferenceField(
				'PARENT',
				EventTable::class,
				['=this.PARENT_ID' => 'ref.ID'],
				['join_type' => 'LEFT']
			)
		)
		->where('CAL_TYPE', 'location')
		->where('DELETED', 'N')
		->where(
			Query::filter()
				->logic('or')
				->where('PARENT.DELETED', 'Y')
				->whereNull('PARENT.ID')
		)
		->where('DATE_TO_TS_UTC', '>', $this->getTimeForQuery())
		->exec()->fetchAll()
		;
}