src/DataProvider/UserDataVisibilityItemDataProvider.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 User item.
     */
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 User item.
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 User item .
public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
    {
        $checkClass = User::class === $resourceClass;
        $checkOperation = ('get' === $operationName) && ('item' === $context['operation_type']);
        return $checkClass && $checkOperation;
    }
public function supports ( string $ resourceClass , string $ operationName = null , array $ context = [ ] ) : bool { $ checkClass = User :: class === $ resourceClass ; $ checkOperation = ( 'get' === $ operationName ) && ( 'item' === $ context [ 'operation_type' ] ) ; return $ checkClass && $ checkOperation ; }
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 .