helper = $voterHelperFactory ->generate(self::class) ->addCheckFor(Center::class, [self::STATS, self::LISTS]) ->build(); } public function getRoles(): array { return $this->getAttributes(); } public function getRolesWithHierarchy(): array { return ['Activity' => $this->getRoles()]; } public function getRolesWithoutScope(): array { return $this->getAttributes(); } protected function supports($attribute, $subject) { return $this->helper->supports($attribute, $subject); } protected function voteOnAttribute($attribute, $subject, TokenInterface $token) { return $this->helper->voteOnAttribute($attribute, $subject, $token); } private function getAttributes() { return [self::STATS, self::LISTS]; } }