L
L
Leonid Korsakov2014-11-20 09:31:29
PHP
Leonid Korsakov, 2014-11-20 09:31:29

Where is the description of the $arResult array in Bitrix for system components?

There are many system components. Dark documentation. Is there somewhere a description of the cells of the $arResult output array for the main (at least) system components? For example a catalog item in detail. Especially when it comes to working with components for online stores.
UPD: It looks like the answer suggests itself - nowhere

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
asdz, 2014-11-20
@asdz

No, and this, in my opinion, is very bad, Bitrix is ​​sort of like MVC (as they themselves say), and which model (arResult) is passed to the view (template) is not declared. You need to find out empirically for each component and sometimes for each specific template and preferably in a debugger, and not with print_r. I can console you, simple components and templates are not so complicated that it is difficult to understand what is happening in them, over time you will get used to Bitrix - yes, it is like that.

F
flutter_shy, 2014-11-20
@flutter_shy

via print_r() look, that would be a better description.

M
Maxim Morozov, 2014-11-20
@murzix

The content of this array depends on many factors. For different settings of the component and different settings of the module, there will be different arrays (with a similar structure). It makes no sense to describe all the variations.
The best option is to view what came in the template file (template.php) via print_r:
?><pre><? print_r() ?></pre><?

A
Alexey Emelyanov, 2014-11-20
@babarun

Documenting all $arResult's of all components is unrealistic, for this you need to hire an uncountable horde of orcs.
It's easier to see what comes in the result.
For the convenience of analyzing $arResult, there is a function pre_0.2.1.php

<?
    pre($arResult);
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question