• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/controller/shift.php
  • Класс: BitrixTimemanControllerShift
  • Вызов: Shift::addAction
public function addAction()
{
	$shiftForm = new ShiftForm();

	if ($shiftForm->load($this->getRequest()) && $shiftForm->validate())
	{
		$result = (new ShiftHandlerCreateHandler())->handle($shiftForm);

		if ($result->isSuccess())
		{
			return ['shiftId' => $result->getShift()->getId()];
		}
	}
	$this->addError($shiftForm->getFirstError());
}