Documentation

ReportsDesignerManager
in package

Table of Contents

COLUMN_ADDED_DT  = 'added_dt'
COLUMN_AUTHOR  = 'author'
COLUMN_BLOCKS  = 'blocks'
COLUMN_CREATED_DT  = 'created_dt'
COLUMN_EDITED_DT  = 'edited_dt'
COLUMN_IS_PUBLIC  = 'is_public'
COLUMN_SEGMENT  = 'segment'
COLUMN_TIME_RANGE  = 'time_range'
COLUMN_TITLE  = 'title'
COLUMN_UUID  = 'uuid'
CURRENT_HALF_YEAR  = 'current_half_year'
CURRENT_MONTH  = 'current_month'
CURRENT_YEAR  = 'current_year'
IMPORT_CREATED  = 'created'
IMPORT_UPDATED  = 'updated'
LAST_30_DAYS  = 'last_30_days'
LAST_7_DAYS  = 'last_7_days'
MANUAL  = 'manual'
PREVIOUS_MONTH  = 'previous_month'
PREVIOUS_YEAR  = 'previous_year'
TABLE_NAME  = 'report_templates'
TODAY  = 'today'
YESTERDAY  = 'yesterday'
$explorer  : Explorer
$session  : Session
$translator  : Translator
__construct()  : mixed
createTemplate()  : mixed
Добавить шаблон отчета
defaultBlocks()  : string
defaultIntervalByRange()  : mixed
endDate()  : DateTime
exportTemplate()  : mixed
findTemplates()  : Selection
Получить список шаблонов отчетов
findTimeRanges()  : array<string|int, mixed>
getDatePeriod()  : DatePeriod|null
Получить список дат входящих в диапазон
getTemplate()  : mixed
importTemplate()  : string
printableDate()  : string
removeTemplate()  : mixed
saveTemplate()  : mixed
sessionData()  : mixed
setSessionData()  : string
startDate()  : DateTime
timeRangeIsExist()  : bool
validateImportedTemplate()  : array<string|int, mixed>
Предварительный анализ шаблона отчета

Constants

Properties

Methods

__construct()

public __construct(Explorer $explorer, Session $session, Translator $translator) : mixed
Parameters
$explorer : Explorer
$session : Session
$translator : Translator
Return values
mixed

createTemplate()

Добавить шаблон отчета

public createTemplate(string $title, string $timeRange, string|null $segment, string $blocks, int $authorId, bool $isPublic[, string|null $uuid = null ]) : mixed
Parameters
$title : string

Название шаблона

$timeRange : string

Временной интервал

$segment : string|null

UUID сегмента

$blocks : string

Строка с JSON блоками

$authorId : int

Идентификатор пользователя автора

$isPublic : bool

Публичный шаблон

$uuid : string|null = null
Tags
throws
TemplateError

Такой временной интервал не разрешен

Return values
mixed

UUID идентификатор добавленного отчета

defaultIntervalByRange()

public defaultIntervalByRange(string $range) : mixed
Parameters
$range : string
Return values
mixed

endDate()

public endDate(DateTime $dt, string $range) : DateTime
Parameters
$dt : DateTime
$range : string
Return values
DateTime

findTemplates()

Получить список шаблонов отчетов

public findTemplates([int|null $authorId = null ][, bool $includePublic = true ]) : Selection
Parameters
$authorId : int|null = null

Идентификатор пользователя автора

$includePublic : bool = true

С учетом публичных

Return values
Selection

findTimeRanges()

public findTimeRanges() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDatePeriod()

Получить список дат входящих в диапазон

public getDatePeriod(DateTime $dt, string $range[, DateTime|null $endDt = null ]) : DatePeriod|null

Если указана конечная дата, название диапазона будет игнорироваться.

Parameters
$dt : DateTime

Начальная дата

$range : string

Название диапазона

$endDt : DateTime|null = null

Конечная дата

Tags
throws
Exception
Return values
DatePeriod|null

getTemplate()

public getTemplate(mixed $uuid) : mixed
Parameters
$uuid : mixed
Return values
mixed

importTemplate()

public importTemplate(string $templateContent, string $segment, mixed $authorId[, mixed $is_public = null ]) : string
Parameters
$templateContent : string
$segment : string
$authorId : mixed
$is_public : mixed = null
Return values
string

printableDate()

public static printableDate(DatePeriod $datePeriod, Translator $translator[, mixed $shorted = true ]) : string
Parameters
$datePeriod : DatePeriod
$translator : Translator
$shorted : mixed = true
Return values
string

removeTemplate()

public removeTemplate(string $uuid) : mixed
Parameters
$uuid : string
Return values
mixed

saveTemplate()

public saveTemplate(string $uuid, string $title, string $timeRange, string|null $segment, string $blocks, bool $isPublic) : mixed
Parameters
$uuid : string

UUID идентификатор отчета

$title : string

Название шаблона

$timeRange : string

Временной интервал

$segment : string|null

UUID сегмента

$blocks : string

Строка с JSON блоками

$isPublic : bool

Публичный шаблон

Tags
throws
TemplateError

Такой временной интервал не разрешен

Return values
mixed

sessionData()

public sessionData(string $name) : mixed
Parameters
$name : string
Return values
mixed

setSessionData()

public setSessionData(mixed $data) : string
Parameters
$data : mixed
Return values
string

startDate()

public startDate(DateTime $dt, string $range) : DateTime
Parameters
$dt : DateTime
$range : string
Return values
DateTime

timeRangeIsExist()

public timeRangeIsExist(string $range) : bool
Parameters
$range : string
Return values
bool

validateImportedTemplate()

Предварительный анализ шаблона отчета

public validateImportedTemplate(string $templateContent[, bool $throw = false ]) : array<string|int, mixed>
Parameters
$templateContent : string

Шаблон отчета в JSON строке

$throw : bool = false

Выбрасывать исключение при ошибке

Tags
throws
TemplateError
Return values
array<string|int, mixed>

Список сообщений анализа

Search results