• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/controller/shiftplan.php
  • Класс: BitrixTimemanControllerShiftPlan
  • Вызов: ShiftPlan::deleteAction
public function deleteAction()
{
	$shiftPlanForm = new ShiftPlanForm();

	if ($shiftPlanForm->load($this->getRequest()) && $shiftPlanForm->validate())
	{
		$result = (new ShiftPlanHandlerDeleteHandler())->handle($shiftPlanForm);
		if ($result->isSuccess())
		{
			$res = ['shiftPlan' => $this->makeResult($result, $deleted = true)];
			return $res;
		}
		$this->addErrors($result->getErrors());
		return [];
	}
	$this->addError($shiftPlanForm->getFirstError());
}