How to render a view from an action class
-
21-12-2019 - |
문제
Let I've written the following action class:
class TranAction extends CAction{
public function run(){
echo "Hello Yii";
}
}
Now I want to render myView
view, but I dont know how can I invoke controller's render()
method from run()
method?
해결책
$this->controller->render('myView');
제휴하지 않습니다 StackOverflow