[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getUserModule() ->getAuthorizationChecker() ->isGrantedAsAdministrator($this->getUserCurrent()); } ], ], ], ]; } public function actionIndex() { return $this->render('index', [ 'countUsersOnline' => $this->getUserModule()->getRepository()->countUsersOnline(), 'countTicketsAdminOpen' => $this->getTicketModule()->getRepository()->countTicketsAdminStatusOpen(), 'countTicketsAdminUnread' => $this->getTicketModule()->getRepository()->countTicketsAdminUnreadByUser($this->getUserCurrent()), 'amountProducerUnpaidInvoices' => '--', ]); } public function actionAjaxAmountProducerInvoicesUnpaid() { return Price::format($this->getProducerModule()->getDolibarrUtils()->getAmountProducerInvoicesUnpaid()); } }