Open thiagotalma opened 3 years ago
It would be great to be able to use the views tools when the action is separate from the controller, in different files, as in the example below.
Is there any possibility?
class DemoController extends Controller { public function actions() { return ArrayHelper::merge(parent::actions(), [ 'view' => ViewAction::class, ]); } }
class ViewAction extends Action { public function run($id) { $model = Model::findOne($id); return $this->controller->render('view', [ 'model' => $model, ]); } }
It would be great to be able to use the views tools when the action is separate from the controller, in different files, as in the example below.
Is there any possibility?