[ 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true, 'roles' => ['@'], 'matchCallback' => function ($rule, $action) { return $this->getFeatureModule()->getChecker()->isEnabled(Feature::ALIAS_SPONSORSHIP) && $this->getUserModule() ->getAuthorizationChecker() ->isGrantedAsProducer($this->getUserCurrent()); } ], ], ], ]; } public function actionIndex() { $producerCurrent = $this->getProducerCurrent(); return $this->render('index', [ 'producer' => $producerCurrent, 'producersGodsonsArray' => $this->getProducerModule()->getRepository()->findProducersSponsorshipGodsons($producerCurrent) ]); } }