J
J
jekahm2015-09-05 14:38:35
Yii
jekahm, 2015-09-05 14:38:35

How are variables buffered before displaying a Breadcrumbs widget in Yii2?

Good day!
I would like to turn to Yii2 experts and find out exactly how this framework buffers all variables before displaying the Breadcrumbs widget. I can’t understand how this is implemented, since the widget itself is called in the general site template (views/layouts/main.php), and the values ​​\u200b\u200bthat fall into this $this->params['breadcrumbs'] array are added in a specific View after his call.
I hope I asked the right question. If anything, fix it.
Thanks in advance for your reply!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pavlenko, 2015-09-05
@jekahm

And the answer is that first the internal file is rendered (actually, the view file), its result is written to $content, and then its result is inserted into the layout; that's all.
In fact, the code that is responsible for breadcrumbs is not complicated, you can look at the documentation and source code, although this is not entirely about breadcrumbs, but more about the principle of the View class (you can also see it )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question