: 743 (Data available since 06.02.2017)
The file result_modifier.php is a tool that is used to arbitrarily modify the data of the component operation. The developer shall create this file independently.
If the file result_modifier.php is located in the template folder, it is retrieved prior to connecting the template.
Sequence of Work of the Component with the File result_modifier.php:
In this file, it is possible to request additional data and introduce them into the array of component operation results
$arResult. It may prove to be useful if any additional data are to be displayed but component customization is undesirable since it means abandoning component support and updates.
Note: The file result_modifier.php will run only if the template is NOT cached. And no dynamic properties of the: title, keywords and descriptioin type can be established through it.
Language phrases of the component template and the following variables are available in the file:
- $arParams - parameters, read, change. Does not affect the homonymous component member but changes made here affect $arParams in the file template.php.
- $arResult — result, read/change. Affects the homonymous component class member.
- $APPLICATION, $USER, $DB - there is no need to declare them global because they are available by default.
- $this — link to the current template (object describing the template CBitrixComponentTemplate type)