• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/controller/schedule.php
  • Класс: BitrixTimemanControllerSchedule
  • Вызов: Schedule::getAutoWiredParameters
public function getAutoWiredParameters()
{
	return [
		new MainEngineAutoWireExactParameter(ScheduleEntity::class, 'schedule', function ($className, $id) {
			$schedule = DependencyManager::getInstance()->getScheduleRepository()->findById($id);
			if (!$schedule)
			{
				throw new EntityNotFoundException('Schedule not found');
			}
			return $schedule;
		}),
	];
}