[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getUserModule() ->getAuthorizationChecker() ->isGrantedAsAdministrator($this->getUserCurrent()); } ] ], ], ]; } public function actionIndex() { $searchTicket = new TicketSearch(); $dataProviderTicketOpen = $searchTicket->search('admin', ['TicketSearch' => ['status' => Ticket::STATUS_OPEN]]); $dataProviderTicketClosed = $searchTicket->search('admin', ['TicketSearch' => ['status' => Ticket::STATUS_CLOSED]]); return $this->render('@backend/views/support/index', [ 'context' => 'admin', 'searchTicket' => $searchTicket, 'dataProviderTicketOpen' => $dataProviderTicketOpen, 'dataProviderTicketClosed' => $dataProviderTicketClosed ]); } }