Overview

Namespaces

  • ApiBundle
    • DataFixtures
      • Faker
        • Provider
    • DependencyInjection
    • Doctrine
      • DBAL
        • Type
      • ORM
        • Filter
          • User
    • Entity
    • EventListener
      • Doctrine
    • Manager
    • Utils
  • FrontBundle
    • Bundle
      • UserBundle
    • Client
      • Exception
    • Controller
    • DependencyInjection
    • Form
      • DataTransformer
      • Type
    • Menu
    • Security
      • Http
        • Authentication
    • Services
      • Http
    • Twig
    • Utils

Classes

  • AbstractResourceSearchFilter
  • Overview
  • Namespace
  • Class

Class AbstractResourceSearchFilter

Based on Dunglas' SearchFilter, its behavior is extended to apply only to specified resources.

ApiBundle\Doctrine\ORM\Filter\AbstractResourceSearchFilter implements Dunglas\ApiBundle\Doctrine\Orm\Filter\FilterInterface uses Fidry\LoopBackApiBundle\Filter\FilterTrait (not available)

Direct known subclasses

ApiBundle\Doctrine\ORM\Filter\User\UserMandateFilter, ApiBundle\Doctrine\ORM\Filter\User\UserTypeFilter
Abstract
Namespace: ApiBundle\Doctrine\ORM\Filter
Author: Théo FIDRY theo.fidry@gmail.com
Located at ApiBundle/Doctrine/ORM/Filter/AbstractResourceSearchFilter.php
Methods summary
public
# __construct( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Dunglas\ApiBundle\Api\IriConverterInterface $iriConverter, Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor, array $properties = null )
public
# apply( Dunglas\ApiBundle\Api\ResourceInterface $resource, Doctrine\ORM\QueryBuilder $queryBuilder, Symfony\Component\HttpFoundation\Request $request )
abstract protected
# applyFilter( Dunglas\ApiBundle\Api\ResourceInterface $resource, Doctrine\ORM\QueryBuilder $queryBuilder, array $queryValues )

Actual logic of the filter, this function is called only if the filter is "applyable" on this resource.

Actual logic of the filter, this function is called only if the filter is "applyable" on this resource.

Parameters

$resource
$queryBuilder
$queryValues

Example

URI is /api/users?filter[where][fullname][like][Admin] and $parameter iswhere`: $queryValues = [ 'fullname' => [ 'like' => Admin ] ]


abstract protected string
# getResourceClass( )

Returns

string
FQCN for which the filter is applied.
protected string
# getFilterValueFromUrl( string $value )

Gets the ID from an URI or a raw ID.

Gets the ID from an URI or a raw ID.

Parameters

$value

Returns

string
TODO: remove this function, it's an ugly copy/paste and should be refactored either at DunglasApiBundle or LoopBackApiBundle.
API documentation generated by ApiGen