-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Data to View #94
Comments
It's already there (named differently): https://github.com/yiisoft/view/blob/master/src/View.php#L51 |
This is not it. We need functionality so that the "view" can leave data for the "layout". The defaultParameters property does not give us such an opportunity. |
I think it does. |
Tell me how to do something like this? This is just an example. |
Same way: $this->defaultParameters['breadcrumbs'][] = $this->title; |
$this->blablabla['breadcrumbs'][] = $this->getTitle(); Works too. The defaultParameters property is private to the View and is not available in the template context. |
There are very few setData and getData functions in place of params like in yii2. In addition to string data (getBlock and setBlock), you need to store data in a free format (mainly for layout).
The text was updated successfully, but these errors were encountered: