• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/service/worktime/action/shiftwithdate.php
  • Класс: BitrixTimemanServiceWorktimeActionShiftWithDate
  • Вызов: ShiftWithDate::__construct
public function __construct(Shift $shift, Schedule $schedule, DateTime $dateTimeStart)
{
	$this->shift = $shift;
	$this->schedule = $schedule;
	if ($this->schedule->isFlextime())
	{
		throw new ArgumentException('Wrong argument, Flexible schedules do not have shifts');
	}
	$this->dateTimeStart = clone $dateTimeStart;
	TimeHelper::getInstance()->setTimeFromSeconds($this->dateTimeStart, $this->shift->getWorkTimeStart());
	$this->dateTimeEnd = clone $this->dateTimeStart;
	$this->dateTimeEnd->add(new DateInterval('PT' . $this->shift->getDuration() . 'S'));
}