Commit a87e8672 by Qiang Xue

doc fix.

parent 7ae5fd4c
...@@ -35,7 +35,7 @@ class SiteController extends Controller ...@@ -35,7 +35,7 @@ class SiteController extends Controller
``` ```
As you can see, typical controller contains actions that are public class methods named as `actionSomething`. As you can see, typical controller contains actions that are public class methods named as `actionSomething`.
The output of an action is what the method returns: it could be a string or an instance of `yii\web\Response`, [for example](#custom-response-class). The output of an action is what the method returns: it could be a string or an instance of [[yii\web\Response]], [for example](#custom-response-class).
The return value will be handled by the `response` application The return value will be handled by the `response` application
component which can convert the output to different formats such as JSON for example. The default behavior component which can convert the output to different formats such as JSON for example. The default behavior
is to output the value unchanged though. is to output the value unchanged though.
......
...@@ -19,7 +19,7 @@ public function actionIndex() ...@@ -19,7 +19,7 @@ public function actionIndex()
``` ```
The first argument to `render()` is the name of the view to display. In the context of the controller, Yii will search for its views in `views/site/` where `site` The first argument to `render()` is the name of the view to display. In the context of the controller, Yii will search for its views in `views/site/` where `site`
is the controller ID. For details on how the view name is resolved, refer to the [yii\base\Controller::render] method. is the controller ID. For details on how the view name is resolved, refer to the [[yii\base\Controller::render()]] method.
The second argument to `render()` is a data array of key-value pairs. Through this array, data can be passed to the view, making the value available in the view as a variable named the same as the corresponding key. The second argument to `render()` is a data array of key-value pairs. Through this array, data can be passed to the view, making the value available in the view as a variable named the same as the corresponding key.
......
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