• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/classes/general/timeman_user.php
  • Класс: CTimeManUser
  • Вызов: CTimeManUser::buildStartForm
private function buildStartForm($timestamp, $report, $extraInformation)
{
	$recordForm = $this->createWorktimeRecordForm();
	$recordForm->recordedStartSeconds = $timestamp > 0 ? $timestamp : null;
	$recordForm->getFirstEventForm()->reason = $report;
	$recordForm->latitudeOpen = $extraInformation['LAT_OPEN'];
	$recordForm->longitudeOpen = $extraInformation['LON_OPEN'];
	$recordForm->ipOpen = $extraInformation['IP_OPEN'];
	$recordForm->device = $extraInformation['DEVICE'];
	$recordForm->recordedStartDateFormatted = isset($extraInformation['CUSTOM_DATE']) ? $extraInformation['CUSTOM_DATE'] : null;

	if (($lastEntry = $this->_getLastData()) && $lastEntry['TASKS'])
	{
		$arTasks = $this->getTasks($lastEntry['TASKS'], true);
		foreach ($arTasks as $task)
		{
			$recordForm->tasks[] = $task['ID'];
		}
	}
	return $recordForm;
}