• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/repository/schedule/calendarrepository.php
  • Класс: BitrixTimemanRepositoryScheduleCalendarRepository
  • Вызов: CalendarRepository::findByIdWithParentCalendarExclusions
public function findByIdWithParentCalendarExclusions($calendarId, $year = null)
{
	$res = CalendarTable::query()
		->addSelect('*')
		->addSelect('EXCLUSIONS')
		->addSelect('PARENT_CALENDAR')
		->addSelect('PARENT_CALENDAR.EXCLUSIONS')
		->where('ID', $calendarId);
	if ($year !== null)
	{
		$res->where(Query::filter()
			->logic('or')
			->where('EXCLUSIONS.YEAR', $year)
			->where('PARENT_CALENDAR.EXCLUSIONS.YEAR', $year)
		);
	}
	return $res
		->exec()
		->fetchObject();
}