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
COLUMN_ADDED_DT
public
mixed
COLUMN_ADDED_DT
= 'added_dt'
COLUMN_AUTHOR
public
mixed
COLUMN_AUTHOR
= 'author'
COLUMN_BLOCKS
public
mixed
COLUMN_BLOCKS
= 'blocks'
COLUMN_CREATED_DT
public
mixed
COLUMN_CREATED_DT
= 'created_dt'
COLUMN_EDITED_DT
public
mixed
COLUMN_EDITED_DT
= 'edited_dt'
COLUMN_IS_PUBLIC
public
mixed
COLUMN_IS_PUBLIC
= 'is_public'
COLUMN_SEGMENT
public
mixed
COLUMN_SEGMENT
= 'segment'
COLUMN_TIME_RANGE
public
mixed
COLUMN_TIME_RANGE
= 'time_range'
COLUMN_TITLE
public
mixed
COLUMN_TITLE
= 'title'
COLUMN_UUID
public
mixed
COLUMN_UUID
= 'uuid'
CURRENT_HALF_YEAR
public
mixed
CURRENT_HALF_YEAR
= 'current_half_year'
CURRENT_MONTH
public
mixed
CURRENT_MONTH
= 'current_month'
CURRENT_YEAR
public
mixed
CURRENT_YEAR
= 'current_year'
IMPORT_CREATED
public
mixed
IMPORT_CREATED
= 'created'
IMPORT_UPDATED
public
mixed
IMPORT_UPDATED
= 'updated'
LAST_30_DAYS
public
mixed
LAST_30_DAYS
= 'last_30_days'
LAST_7_DAYS
public
mixed
LAST_7_DAYS
= 'last_7_days'
MANUAL
public
mixed
MANUAL
= 'manual'
PREVIOUS_MONTH
public
mixed
PREVIOUS_MONTH
= 'previous_month'
PREVIOUS_YEAR
public
mixed
PREVIOUS_YEAR
= 'previous_year'
TABLE_NAME
public
mixed
TABLE_NAME
= 'report_templates'
TODAY
public
mixed
TODAY
= 'today'
YESTERDAY
public
mixed
YESTERDAY
= 'yesterday'
Properties
$explorer
private
Explorer
$explorer
$session
private
Session
$session
$translator
private
Translator
$translator
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
Return values
mixed —UUID идентификатор добавленного отчета
defaultBlocks()
public
defaultBlocks() : string
Return values
string —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 —exportTemplate()
public
exportTemplate(mixed $uuid) : mixed
Parameters
- $uuid : mixed
Tags
Return values
mixed —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
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
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
Return values
array<string|int, mixed> —Список сообщений анализа