src/DataProvider/MyGroupsCollectionDataProvider.php
/**
     * This method is used by Symfony to know if it has to call this DataProvider. This method returns true if the request is a GET on a Group collection with the `my_groups` name.
     */
This method is used by Symfony to know if it has to call this DataProvider. This method returns true if the request is a GET on a Group collection with the `my_groups` name.
This method is used by Symfony to know if it has to call this DataProvider . This method returns true if the request is a GET on a Group collection with the ` my_groups ` name .
public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
    {
        $checkClass = Group::class === $resourceClass;
        $checkOperation = ('my_groups' === $operationName) && ('collection' === $context['operation_type']);
        $userLogged = null !== $this->security->getUser();
        return $checkClass && $checkOperation && $userLogged;
    }
public function supports ( string $ resourceClass , string $ operationName = null , array $ context = [ ] ) : bool { $ checkClass = Group :: class === $ resourceClass ; $ checkOperation = ( 'my_groups' === $ operationName ) && ( 'collection' === $ context [ 'operation_type' ] ) ; $ userLogged = null !== $ this -> security -> getUser ( ) ; return $ checkClass && $ checkOperation && $ userLogged ; }
This method is used by Symfony to know if it has to call this DataProvider.
This method is used by Symfony to know if it has to call this DataProvider .