public function actionIndex() { $this->view->news = Article::findAllWithGenerator(); $this->view->table = (new AdminDataTable(Author::findAll(), [function ($model) { return $model->getName(); }, function ($model) { return $model->getEmail(); }]))->render(); $this->view->display(__DIR__ . '/../../templates/admin.php'); }