resolver->inherit($user,'groups', $attribute) ?? false; } return false; } /** * Determines if the attribute and subject are supported by this voter. * * @param string $attribute An attribute * @param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type * * @return bool True if the attribute and subject are supported, false otherwise */ protected function supports($attribute, $subject) { if ($subject instanceof Group) { return $this->resolver->isValidOperation('groups', $attribute); } return false; } }