src/Graviton/RestBundle/Restriction/Manager.php
public function handle(DocumentRepository $repository)
    {
        $className = $repository->getClassName();
        if (isset($this->restrictedFieldMap[$className]) && !empty($this->restrictedFieldMap[$className])) {
            $nodes = [];
            foreach ($this->restrictedFieldMap[$className] as $fieldPath => $handlers) {
                $nodes = array_merge(
                    $nodes,
                    $this->getHandlerValue($repository, $fieldPath, $handlers)
                );
            }
            return new AndNode($nodes);
        }
        return false;
    }
public function handle(DocumentRepository $repository)
    {
        $className = $repository->getClassName();
        if (isset($this->restrictedFieldMap[$className]) && !empty($this->restrictedFieldMap[$className])) {
            $nodes = [];
            foreach ($this->restrictedFieldMap[$className] as $fieldPath => $handlers) {
                $nodes = array_merge(
                    $nodes,
                    $this->getHandlerValue($repository, $fieldPath, $handlers)
                );
            }
            return new AndNode($nodes);
        }
        return false;
    }
public function handle ( DocumentRepository $ repository ) { $ className = $ repository -> getClassName ( ) ; if ( isset ( $ this -> restrictedFieldMap [ $ className ] ) && ! empty ( $ this -> restrictedFieldMap [ $ className ] ) ) { $ nodes = [ ] ; foreach ( $ this -> restrictedFieldMap [ $ className ] as $ fieldPath => $ handlers ) { $ nodes = array_merge ( $ nodes , $ this -> getHandlerValue ( $ repository , $ fieldPath , $ handlers ) ) ; } return new AndNode ( $ nodes ) ; } return false ; }
handle the request for a given entity

@param DocumentRepository $repository repository

@return bool|AndNode either false if no restrictions or an AndNode for filtering
handle the request for a given entity