• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/model/schedule/schedule.php
  • Класс: BitrixTimemanModelScheduleSchedule
  • Вызов: Schedule::defineWorktimeRestrictions
private function defineWorktimeRestrictions($restrictionsForm)
{
	$restrictions = (array)$this->getWorktimeRestrictions();
	if ($restrictionsForm->maxShiftStartOffset >= 0 && $this->isShifted())
	{
		$restrictions[ScheduleTable::WORKTIME_RESTRICTION_MAX_SHIFT_START_OFFSET] = $restrictionsForm->maxShiftStartOffset;
	}
	if ($restrictionsForm->allowedToEditRecord !== null)
	{
		$restrictions[ScheduleTable::WORKTIME_RESTRICTION_ALLOWED_TO_EDIT_RECORD] = (bool)$restrictionsForm->allowedToEditRecord;
	}
	if ($restrictionsForm->allowedToReopenRecord !== null)
	{
		$restrictions[ScheduleTable::WORKTIME_RESTRICTION_ALLOWED_TO_REOPEN_RECORD] = (bool)$restrictionsForm->allowedToReopenRecord;
	}
	$this->setWorktimeRestrictions($restrictions);
}