Commit 9bf4bcbf by Qiang Xue

Merge pull request #5009 from tebazil/patch-1

Update structure-views.md
parents b9c97ff2 9079179f
...@@ -264,7 +264,7 @@ echo $this->render('report', [ ...@@ -264,7 +264,7 @@ echo $this->render('report', [
``` ```
The pull approach actively retrieves data from the [[yii\base\View|view component]] or other objects accessible The pull approach actively retrieves data from the [[yii\base\View|view component]] or other objects accessible
in views (e.g. `Yii::$app`). Using the above code as an example, within the view you can get the controller object in views (e.g. `Yii::$app`). Using the code below as an example, within the view you can get the controller object
by the expression `$this->context`. And as a result, it is possible for you to access any properties or methods by the expression `$this->context`. And as a result, it is possible for you to access any properties or methods
of the controller in the `report` view, such as the controller ID shown in the following: of the controller in the `report` view, such as the controller ID shown in the following:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment