prepareSelectViewElement
prepareSelectViewElement($elem, $select, $is_init_entity_aggregated, $fList, $fChainList, $helper_class, Entity\Base $entity);
Creates an alias and expression for a field, with account of options, selected for it in the report settings.
Note. It is used in the report view component.
Function parameters
Parameter | Description |
---|---|
$elem | Element from the array of selected report fields. |
$select | Array of selected report fields. |
$is_init_entity_aggregated | Attribute that specifies records grouping of basic report entity in the resulting retrieved data. |
$fList | Array of objects, describing selected report fields. |
$fChainList | Array of chain objects of selected report fields. |
$helper_class | Name of report helper class. |
$entity | Object of report basic entity. |
Returned value
Returns an array of two elements. First element contains an alias of selected report field. Second element contains an expression similar to those returned by the getColumnList helper class method with only difference that report settings are taken into account, such as: whether the field is countable, which operation is applied for field calculation (total, number of unique values, average, maximum, percent of column and etc.). Returned value is subsequently used to create the fields with completion time, if required, and to generate query for data retrieval.
© «Bitrix24», 2001-2024