S
S
Sergey2014-11-12 15:30:39
PHP
Sergey, 2014-11-12 15:30:39

How to find out which Bitrix method returned an array that is available in template.php?

In the template.php of the module (i.e. in its view files) there is an $arResult array that we are working with. But how to find out which method and which class returned this array, what parameters were passed to it in order to get exactly the same array? (elsewhere)
Where can I watch it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
asdz, 2014-11-12
@asdz

I think you are using something wrong. The template is called by the component, you specify which template to call when you call the component in your code. In order to get the same array elsewhere, you probably need to call the component again? Better explain what the task is, maybe you don’t want to use the right way to solve it?

A
Alexander, 2014-11-12
Madzhugin @Suntechnic

It was returned by the component. Look at the device of the component and find out what the method is. Moreover, most likely, this is not one method. The component can still perform a bunch of actions with a result. For example deploy file properties or bindings. Deploy DETAIL_PICTURE and PREVIEW_PICTURE etc.
To get the same array, use the same component.
Judging by the comment, it's enough for you to simply add all these properties to the cart result in result_modiefer.php
Read what it is - it's not difficult there.

J
justdealman, 2017-02-01
@justdealman

https://jsfiddle.net/70xLf5s1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question