• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/classes/general/timeman_user.php
  • Класс: CTimeManUser
  • Вызов: CTimeManUser::buildEditForm
private function buildEditForm($arParams)
{
	$recordForm = WorktimeRecordForm::createWithEventForm();
	$recordForm->editedBy = $this->USER_ID;
	$recordForm->userId = $this->USER_ID;
	$recordForm->recordedStartSeconds = $arParams['TIME_START'];
	$recordForm->recordedStartDateFormatted = $arParams['DATE_START'];
	$recordForm->recordedStopSeconds = $arParams['TIME_FINISH'];
	$recordForm->recordedStopDateFormatted = $arParams['DATE_FINISH'];
	$recordForm->recordedBreakLength = $arParams['TIME_LEAKS'];
	$recordForm->device = $arParams['DEVICE'];
	$recordForm->getFirstEventForm()->reason = $arParams['REPORT'];
	if (isset($arParams['LAT_CLOSE']))
	{
		$recordForm->latitudeClose = $arParams['LAT_CLOSE'];
	}
	if (isset($arParams['LON_CLOSE']))
	{
		$recordForm->longitudeClose = $arParams['LAT_CLOSE'];
	}
	$recordForm->ipClose = $_SERVER['REMOTE_ADDR'];
	return $recordForm;
}