[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getUserManager()->hasAccessBackend(); } ], ], ], 'verbs' => [ 'class' => VerbFilter::class, 'actions' => [ ], ], ]; } /** * Affiche le tableau de bord avec les distributions à venir et les dernières commandes passées ou modifiées. */ public function actionIndex() { return $this->render('index', [ 'producer' => $this->getProducerCurrent(), 'productsCount' => $this->getProductContainer()->getRepository()->countProducts(), 'pointsSaleCount' => $this->getPointSaleContainer()->getRepository()->countPointSales(), 'distributionsArray' => $this->getDistributionContainer()->getRepository()->findDistributionsDashboard(), 'ordersArray' => $this->getOrderContainer()->getRepository()->findOrdersDashboard(), 'subscriptionsLatestAddedArray' => $this->getSubscriptionContainer()->getRepository()->findSubscriptionsLatestAdded() ]); } }