Property | Type | Description | |
---|---|---|---|
$logger | |||
$managerRegistry | |||
$properties | |||
$requestStack |
Method | Description | |
---|---|---|
__construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, Psr\Log\LoggerInterface $logger = null, array $properties = null ) | ||
apply ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null ) |
Method | Description | |
---|---|---|
addJoinOnce ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $association ) : string | Adds a join to the queryBuilder if none exists. | |
addJoinsForNestedProperty ( string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator ) : array | Adds the necessary joins for a nested property. | |
extractProperties ( |
Extracts properties to filter from the request. | |
filterProperty ( string $property, mixed $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null ) | Passes a property through the filter. | |
getClassMetadata ( string $resourceClass ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | Gets class metadata for the given resource. | |
getNestedMetadata ( string $resourceClass, array $associations ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | Gets nested class metadata for the given resource. | |
isPropertyEnabled ( string $property ) : boolean | Determines whether the given property is enabled. | |
isPropertyMapped ( string $property, string $resourceClass, boolean $allowAssociation = false ) : boolean | Determines whether the given property is mapped. | |
isPropertyNested ( string $property ) : boolean | Determines whether the given property is nested. | |
splitPropertyParts ( string $property ) : array | Splits the given property into parts. |
Method | Description | |
---|---|---|
getExistingJoin ( Doctrine\ORM\QueryBuilder $queryBuilder, string $alias, string $association ) : Doctrine\ORM\Query\Expr\Join | null | Get the existing join from queryBuilder DQL parts. |
public __construct ( Doctrine\Common\Persistence\ManagerRegistry $managerRegistry, Symfony\Component\HttpFoundation\RequestStack $requestStack, Psr\Log\LoggerInterface $logger = null, array $properties = null ) | ||
$managerRegistry | Doctrine\Common\Persistence\ManagerRegistry | |
$requestStack | Symfony\Component\HttpFoundation\RequestStack | |
$logger | Psr\Log\LoggerInterface | |
$properties | array |
protected addJoinOnce ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $alias, string $association ) : string | ||
$queryBuilder | Doctrine\ORM\QueryBuilder | |
$queryNameGenerator | ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface | |
$alias | string | |
$association | string | the association field |
return | string | the new association alias |
protected addJoinsForNestedProperty ( string $property, string $rootAlias, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator ) : array | ||
$property | string | |
$rootAlias | string | |
$queryBuilder | Doctrine\ORM\QueryBuilder | |
$queryNameGenerator | ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface | |
return | array | An array where the first element is the join $alias of the leaf entity, the second element is the $field name the third element is the $associations array |
public apply ( Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null ) | ||
$queryBuilder | Doctrine\ORM\QueryBuilder | |
$queryNameGenerator | ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface | |
$resourceClass | string | |
$operationName | string |
protected extractProperties ( |
||
$request | ||
return | array |
abstract protected filterProperty ( string $property, mixed $value, Doctrine\ORM\QueryBuilder $queryBuilder, ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, string $operationName = null ) | ||
$property | string | |
$value | mixed | |
$queryBuilder | Doctrine\ORM\QueryBuilder | |
$queryNameGenerator | ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface | |
$resourceClass | string | |
$operationName | string |
protected getClassMetadata ( string $resourceClass ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | ||
$resourceClass | string | |
return | Doctrine\Common\Persistence\Mapping\ClassMetadata |
protected getNestedMetadata ( string $resourceClass, array $associations ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | ||
$resourceClass | string | |
$associations | array | |
return | Doctrine\Common\Persistence\Mapping\ClassMetadata |
protected isPropertyEnabled ( string $property ) : boolean | ||
$property | string | |
return | boolean |
protected isPropertyNested ( string $property ) : boolean | ||
$property | string | |
return | boolean |
protected splitPropertyParts ( string $property ) : array | ||
$property | string | |
return | array |