[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'actions' => ['index', 'system', 'user', 'info'], 'roles' => ['admin'], // only admin can do these ] ], ], 'verbs' => [ 'class' => VerbFilter::class, 'actions' => [ 'index' => ['GET'], 'system' => ['GET'], 'user' => ['GET'], 'info' => ['GET'], ], ], ] ); } public function init(): void { parent::init(); $this->layout = 'admin_main'; } /** * @return string */ public function actionIndex(): string { return $this->render('index'); } /** * @return string */ public function actionSystem(): string { return $this->render('system'); } /** * @return string */ public function actionUser(): string { return $this->render('user'); } /** * @return string */ public function actionInfo(): string { return $this->render('info'); } }