CallDurationGraph extends CallDuration implements IReportMultipleGroupedData
Class CallDuration
Table of Contents
Interfaces
- IReportMultipleGroupedData
- Interface IReportMultipleGroupedData
Methods
- __clone() : void
- In cloning of entity clone nested entities too.(configurations, form elements list).
- __construct() : mixed
- BaseReport constructor.
- addDateWithGrouping() : void
- Adds a DATE field and grouping based on the user's time zone and time period to query.
- addFormElement() : void
- Add form element to end of elements list.
- addFormElementAfter() : void
- Add form element after target element.
- addFormElementBefore() : void
- Add form element before target element.
- addFormElementToEnd() : void
- Analog of add form element.
- addFormElementToStart() : void
- Insert element to start of form elements list.
- createUrl() : string
- Creates a link to an $baseUri with parameters from $params.
- fillReport() : void
- Fill report handler properties from Report entity.
- formatDuration() : mixed
- formatDurationByMinutes() : mixed
- formatPeriodCompare() : int|string
- Converts a value to float, int, or null for use in a report view.
- getAnalyticBoardByKey() : AnalyticBoard|null
- Returns a board with a report by its key.
- getCalculatedData() : mixed
- getCalculateField() : DropDown
- getCategoryKey() : string
- getClassName() : string
- getCollectedFormElements() : array<string|int, Base>
- getConfiguration() : Configuration|null
- TODO@ optimise this
- getConfigurations() : array<string|int, Configuration>
- getConfigurationsGidKeyed() : array<string|int, Configuration>
- getDateForUrl() : mixed
- Returns an array with a date object, start and end dates of the period in string format to insert into the request.
- getFormElement() : Base|BaseValuable|null
- In form elements list find form element with key $fieldKey.
- getFormElementByDataAttribute() : Base|null
- Find form element by attribute key value pair.
- getFormElementFromCollected() : Base|BaseValuable|null
- getFormElements() : array<string|int, Base>
- getFormElementValue() : mixed|null
- Returns value of the form element with given key.
- getGroupingField() : DropDown
- getMultipleGroupedData() : array<string|int, mixed>
- Array format for return this method:<br> array( 'items' => array( array( 'groupBy' => 01.01.1970 or 15 etc.
- getMultipleGroupedDemoData() : array<string|int, mixed>
- getReport() : Report
- getReportImplementedDataTypes() : array<string|int, mixed>
- getTitle() : string
- getUnitKey() : string
- getUserInfo() : array<string|int, mixed>|null
- Returns [id, name, link, icon] for the specified user id.
- getView() : View|null
- getWeight() : mixed
- getWhatWillCalculateOptions() : array<string|int, mixed>
- getWidgetHandler() : BaseWidget|null
- isEnabled() : bool
- In some case, need to dynamically disable some report handler
- preloadUserInfo() : void
- Gets users fields by Ids
- prepare() : array<string|int, mixed>|mixed
- Prepares report data.
- prepareEntityListFilter() : Query
- removeFormElement() : bool
- Remove from form elements list form element.
- setCalculatedData() : void
- setConfigurations() : void
- setFormElements() : void
- Setter to set form elements multiply.
- setReport() : void
- setTitle() : void
- setView() : void
- setWeight() : void
- setWidgetHandler() : void
- Attach report handler to widget handler.
- updateFormElementValue() : bool
Methods
__clone()
In cloning of entity clone nested entities too.(configurations, form elements list).
public
__clone() : void
__construct()
BaseReport constructor.
public
__construct() : mixed
addDateWithGrouping()
Adds a DATE field and grouping based on the user's time zone and time period to query.
public
addDateWithGrouping(Query $query[, bool $useTimePeriod = false ]) : void
Parameters
- $query : Query
- $useTimePeriod : bool = false
addFormElement()
Add form element to end of elements list.
public
addFormElement(Base $element) : void
Parameters
- $element : Base
-
Element to add to form.
addFormElementAfter()
Add form element after target element.
public
addFormElementAfter(Base $newElement, Base $targetElement) : void
Parameters
addFormElementBefore()
Add form element before target element.
public
addFormElementBefore(Base $newElement, Base $targetElement) : void
Parameters
addFormElementToEnd()
Analog of add form element.
public
addFormElementToEnd(Base $newElement) : void
Parameters
- $newElement : Base
-
Element which need to insert to end of form.
addFormElementToStart()
Insert element to start of form elements list.
public
addFormElementToStart(Base $newElement) : void
Parameters
- $newElement : Base
-
Element which need to insert to start of form.
createUrl()
Creates a link to an $baseUri with parameters from $params.
public
createUrl(string $baseUri[, array<string|int, mixed> $params = [] ]) : string
Parameters
- $baseUri : string
- $params : array<string|int, mixed> = []
Return values
stringfillReport()
Fill report handler properties from Report entity.
public
fillReport(Report $report) : void
Parameters
- $report : Report
-
Report entity.
formatDuration()
public
formatDuration(mixed $duration) : mixed
Parameters
- $duration : mixed
formatDurationByMinutes()
public
formatDurationByMinutes(mixed $duration) : mixed
Parameters
- $duration : mixed
formatPeriodCompare()
Converts a value to float, int, or null for use in a report view.
public
formatPeriodCompare(mixed $value) : int|string
Parameters
- $value : mixed
Return values
int|stringgetAnalyticBoardByKey()
Returns a board with a report by its key.
public
static getAnalyticBoardByKey(mixed $key) : AnalyticBoard|null
Parameters
- $key : mixed
Return values
AnalyticBoard|nullgetCalculatedData()
public
getCalculatedData() : mixed
getCalculateField()
public
getCalculateField() : DropDown
Return values
DropDowngetCategoryKey()
public
getCategoryKey() : string
Return values
stringgetClassName()
public
static getClassName() : string
Return values
stringgetCollectedFormElements()
public
getCollectedFormElements() : array<string|int, Base>
Return values
array<string|int, Base>getConfiguration()
TODO@ optimise this
public
getConfiguration(string $key) : Configuration|null
Parameters
- $key : string
-
Unique key to find configuration.
Return values
Configuration|nullgetConfigurations()
public
getConfigurations() : array<string|int, Configuration>
Return values
array<string|int, Configuration>getConfigurationsGidKeyed()
public
getConfigurationsGidKeyed() : array<string|int, Configuration>
Return values
array<string|int, Configuration>getDateForUrl()
Returns an array with a date object, start and end dates of the period in string format to insert into the request.
public
getDateForUrl(mixed $date) : mixed
Parameters
- $date : mixed
getFormElement()
In form elements list find form element with key $fieldKey.
public
getFormElement(string $fieldKey) : Base|BaseValuable|null
Parameters
- $fieldKey : string
-
Unique key to find form element.
Return values
Base|BaseValuable|nullgetFormElementByDataAttribute()
Find form element by attribute key value pair.
public
getFormElementByDataAttribute(string $attributeKey, string $value) : Base|null
Parameters
- $attributeKey : string
-
Attribute key to find in form elements list.
- $value : string
-
Value of attribute name for needle form element.
Return values
Base|nullgetFormElementFromCollected()
public
getFormElementFromCollected(string $key) : Base|BaseValuable|null
Parameters
- $key : string
-
Unique key to fine element in form elements list.
Return values
Base|BaseValuable|nullgetFormElements()
public
getFormElements() : array<string|int, Base>
Return values
array<string|int, Base>getFormElementValue()
Returns value of the form element with given key.
public
getFormElementValue(string $fieldKey) : mixed|null
Parameters
- $fieldKey : string
-
The key of the field.
Return values
mixed|nullgetGroupingField()
public
getGroupingField(DropDown $whatWillCalculateField) : DropDown
Parameters
- $whatWillCalculateField : DropDown
-
What will calculate field.
Return values
DropDowngetMultipleGroupedData()
Array format for return this method:<br> array( 'items' => array( array( 'groupBy' => 01.01.1970 or 15 etc.
public
getMultipleGroupedData() : array<string|int, mixed>
'title' => 'Some Title', 'value' => 1, 'targetUrl' => 'http://url.domain?params=param' ), array( 'groupBy' => 01.01.1970 or 15 etc. 'title' => 'Some Title', 'value' => 2, 'targetUrl' => 'http://url.domain?params=param' ) ), 'config' => array( 'groupsLabelMap' => array( '01.01.1970' => 'Start of our internet evolution' '15' => 'Just a simple integer' ), 'reportTitle' => 'Some title for this report' ) )
Return values
array<string|int, mixed>getMultipleGroupedDemoData()
public
getMultipleGroupedDemoData() : array<string|int, mixed>
Return values
array<string|int, mixed>getReport()
public
getReport() : Report
Return values
ReportgetReportImplementedDataTypes()
public
getReportImplementedDataTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>getTitle()
public
getTitle() : string
Return values
stringgetUnitKey()
public
getUnitKey() : string
Return values
stringgetUserInfo()
Returns [id, name, link, icon] for the specified user id.
public
getUserInfo(int $userId[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>|null
Parameters
- $userId : int
-
Id of the user.
- $params : array<string|int, mixed> = []
-
Additional optional parameters
- avatarWidth int
- avatarHeight int
Return values
array<string|int, mixed>|nullgetView()
public
getView() : View|null
Return values
View|nullgetWeight()
public
getWeight() : mixed
getWhatWillCalculateOptions()
public
getWhatWillCalculateOptions([null $groupingValue = null ]) : array<string|int, mixed>
Parameters
- $groupingValue : null = null
-
Grouping field value.
Return values
array<string|int, mixed>getWidgetHandler()
public
getWidgetHandler() : BaseWidget|null
Return values
BaseWidget|nullisEnabled()
In some case, need to dynamically disable some report handler
public
isEnabled() : bool
Return values
boolpreloadUserInfo()
Gets users fields by Ids
public
preloadUserInfo(array<string|int, mixed> $userIds) : void
Parameters
- $userIds : array<string|int, mixed>
prepare()
Prepares report data.
public
prepare() : array<string|int, mixed>|mixed
Return values
array<string|int, mixed>|mixedprepareEntityListFilter()
public
prepareEntityListFilter(mixed $requestParameters) : Query
Parameters
- $requestParameters : mixed
Return values
QueryremoveFormElement()
Remove from form elements list form element.
public
removeFormElement(Base $element) : bool
Parameters
- $element : Base
-
Element to remove.
Return values
boolsetCalculatedData()
public
setCalculatedData(mixed $calculatedData) : void
Parameters
- $calculatedData : mixed
-
Report handler calculated data.
setConfigurations()
public
setConfigurations(array<string|int, Configuration> $configurations) : void
Parameters
- $configurations : array<string|int, Configuration>
-
Configuration list to set.
setFormElements()
Setter to set form elements multiply.
public
setFormElements(array<string|int, Base> $formElementList) : void
Parameters
- $formElementList : array<string|int, Base>
-
Form elements to set in form.
setReport()
public
setReport(Report $report) : void
Parameters
- $report : Report
-
Report entity.
setTitle()
public
setTitle(string $title) : void
Parameters
- $title : string
-
Title of report handler.
setView()
public
setView(View $view) : void
Parameters
- $view : View
-
View entity to set of handler.
setWeight()
public
setWeight(mixed $weight) : void
Parameters
- $weight : mixed
-
Weight value for sorting.
setWidgetHandler()
Attach report handler to widget handler.
public
setWidgetHandler(BaseWidget $widgetHandler) : void
Parameters
- $widgetHandler : BaseWidget
-
Widget handler.
updateFormElementValue()
public
updateFormElementValue(BaseValuable|string $formElement, mixed $value) : bool
Parameters
- $formElement : BaseValuable|string
-
Form element which need to update.
- $value : mixed
-
New value for form element.