generateColumnTree
generateColumnTree($chains, $initEntity, $helper_class, $level = 0);
Generates a tree with description of fields, available in the report with bindngs to entity chains. Static method.
Function parameters
Parameter | Description |
---|---|
$chains | Array with object chains, corresponding to the report fields description (result, returned via the generateChains method). |
$initEntity | Object of the report basic entity. |
$helper_class | Name of the report helper class. |
$level | Level of recursion. |
Returned value
Returns a tree with description of fields, available in the report, their meta-data, uploaded names and bindings to entity chains. For example, report builder constructs fields selection interface from a tree into the report.
Examples of use
<?
// Retrieval basic entity name by calling getEntityName helper class method. $entityName = call_user_func(array($arParams['REPORT_HELPER_CLASS'], 'getEntityName')); // Retrieval basic report entity field description by calling getColumnList helper class method. $entityFields = call_user_func(array($arParams['REPORT_HELPER_CLASS'], 'getColumnList')); // Retrieval of array of object chains of all fields, available in the report. $chains = CReport::generateChains($entityFields, $entity, ''); // Generating a tree with description of fields, available in the report. $fieldsTree = CReport::generateColumnTree($chains, $entity, $arParams['REPORT_HELPER_CLASS']);
?>
© «Bitrix24», 2001-2024