[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getUserManager()->hasAccessBackend(); } ] ], ], ]; } /** * Liste les versions d'Opendistrib */ public function actionIndex() { $producerManager = $this->getProducerManager(); $versionsArray = Opendistrib::getVersions(); $versionsRenderArray = []; foreach ($versionsArray as $version) { $versionsRenderArray[$version] = [ 'version' => $version, 'content' => $this->renderFile('@common/versions/' . $version . '.php') ]; } $producerManager->updateOpendistribVersion($this->getProducerCurrent()); return $this->render('index', [ 'versionsArray' => $versionsRenderArray ]); } }