src/Security/Voter/GroupAdminVoter.php
/**
     * This method is used by Symfony to know if it has to call this Voter. This method returns a boolean based on the arguments given to `is-granted()`.
     *
     * @param mixed $attribute
     * @param mixed $subject
     */
This method is used by Symfony to know if it has to call this Voter. This method returns a boolean based on the arguments given to `is-granted()`.
@param mixed $attribute
@param mixed $subject
This method is used by Symfony to know if it has to call this Voter . This method returns a boolean based on the arguments given to ` is - granted () ` . @param mixed $attribute @param mixed $subject
protected function supports($attribute, $subject): bool
    {
        $supportsAttribute = \in_array($attribute, ['patch', 'delete'], true);
        $supportsSubject = $subject instanceof Group;
        $userLogged = null !== $this->security->getUser();
        return $supportsAttribute && $supportsSubject && $userLogged;
    }
protected function supports ( $ attribute , $ subject ) : bool { $ supportsAttribute = \ in_array ( $ attribute , [ 'patch' , 'delete' ] , true ) ; $ supportsSubject = $ subject instanceof Group ; $ userLogged = null !== $ this -> security -> getUser ( ) ; return $ supportsAttribute && $ supportsSubject && $ userLogged ; }
This method is used by Symfony to know if it has to call this Voter.
This method is used by Symfony to know if it has to call this Voter .