- Модуль: timeman
- Путь к файлу: ~/bitrix/modules/timeman/classes/general/timeman_report_full.php
- Класс: CUserReportFull
- Вызов: CUserReportFull::getSavedReportFull
private function getSavedReportFull(int $userId): array
{
$info = CTimeMan::getRuntimeInfo(true);
$datefomat = CSite::getDateFormat("SHORT",SITE_ID);
$queryObject = CTimeManReportFull::getList(
["DATE_FROM" => "DESC"],
["USER_ID"=> $userId, "=ACTIVE" => "N"],
[],
["nTopCount"=>1]
);
if ($report = $queryObject->fetch())
{
$info["REPORT_DATE_FROM"] = MakeTimeStamp($report["DATE_FROM"], $datefomat);
$info["REPORT_DATE_TO"] = MakeTimeStamp($report["DATE_TO"], $datefomat);
//$info["TASKS"] = unserialize($report["TASKS"], ['allowed_classes' => false]);
$info["REPORT"] = $report["REPORT"];
$info["PLANS"] = $report["PLANS"];
if ($report["FILES"])
$info["FILES"] = unserialize($report["FILES"], ['allowed_classes' => false]);
$info["REPORT_ID"] = $report["ID"];
$info['DATE_TEXT'] = $this->getReportDateText($info["REPORT_DATE_FROM"], $info["REPORT_DATE_TO"]);
}
return [$info, ($report ? $report : [])];
}