PHP Class ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter

The ordering is done in the same sequence as they are specified in the query, and for each property a direction value can be specified. For each property passed, if the resource does not have such property or if the direction value is different from "asc" or "desc" (case insensitive), the property is ignored.
Author: Kévin Dunglas ([email protected])
Author: Théo FIDRY ([email protected])
Inheritance: extends AbstractFilter
Datei anzeigen Open project: api-platform/core Class Usage Examples

Protected Properties

Property Type Description
$orderParameterName Keyword used to retrieve the value

Public Methods

Method Description
__construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, string $orderParameterName, Psr\Log\LoggerInterface $logger = null, array $properties = null )
getDescription ( string $resourceClass ) : array

Protected Methods

Method Description
extractProperties ( Request $request ) : array
filterProperty ( string $property, $direction, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )

Method Details

__construct() public method

public __construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, string $orderParameterName, Psr\Log\LoggerInterface $logger = null, array $properties = null )
$managerRegistry Doctrine\Common\Persistence\ManagerRegistry
$requestStack Symfony\Component\HttpFoundation\RequestStack
$orderParameterName string
$logger Psr\Log\LoggerInterface
$properties array

extractProperties() protected method

protected extractProperties ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
return array

filterProperty() protected method

protected filterProperty ( string $property, $direction, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null )
$property string
$queryBuilder Doctrine\ORM\QueryBuilder
$queryNameGenerator ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface
$resourceClass string
$operationName string

getDescription() public method

public getDescription ( string $resourceClass ) : array
$resourceClass string
return array

Property Details

$orderParameterName protected_oe property

Keyword used to retrieve the value
protected $orderParameterName