Property | Type | Description | |
---|---|---|---|
$expressionFields | array | Array of unique field descriptors from expressions. | |
$expressions | |||
$queryBuilder | Doctrine\ORM\QueryBuilder | ||
$searchFields | Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] | ||
$selectFields | Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] |
Method | Description | |
---|---|---|
__construct ( |
||
count ( ) | ||
createAndExpression ( array $expressions ) | ||
createBetweenExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values ) | ||
createInExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values ) | ||
createOrExpression ( array $expressions ) | ||
createWhereExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value, $comparator ) | ||
distinct ( boolean $flag = true ) | Eliminates duplicated rows. | |
execute ( ) | ||
setIdField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $idField ) | Set id-field of the "root" entity. |
Method | Description | |
---|---|---|
assignGroupBy ( Doctrine\ORM\QueryBuilder $queryBuilder ) | Sets group by fields to querybuilder. | |
assignJoins ( Doctrine\ORM\QueryBuilder $queryBuilder, array $joins = null ) | Adds joins to querybuilder. | |
assignSortFields ( Doctrine\ORM\QueryBuilder $queryBuilder ) | Assigns ORDER BY clauses to querybuilder. | |
createQueryBuilder ( array | null $joins = null ) : Doctrine\ORM\QueryBuilder | Creates Querybuilder. | |
createSubQueryBuilder ( null | string $select = null ) : Doctrine\ORM\QueryBuilder | Creates a query-builder for sub-selecting ID's. | |
findIdsByGivenCriteria ( ) : array | Function that finds all IDs of entities that match the search criteria. | |
getAllFieldNames ( |
Returns all fieldnames used in the expressions. | |
getAllFields ( boolean $onlyReturnFilterFields = false ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] | Returns all FieldDescriptors that were passed to list builder. | |
getEntityNamesOfFieldDescriptors ( array $filterFields ) : string[] | Returns array of field-descriptor aliases. | |
getJoins ( ) : |
Returns all the joins required for the query. | |
getNecessaryJoins ( string[] $necessaryEntityNames ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] | Function returns all necessary joins for filtering result. | |
getUniqueExpressionFieldDescriptors ( array $expressions ) : array | Returns an array of unique expression field descriptors. | |
hasSelectStatement ( Doctrine\ORM\QueryBuilder $queryBuilder, $statement ) |
public __construct ( |
||
$em | ||
$eventDispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface | |
$permissions | array |
protected assignGroupBy ( Doctrine\ORM\QueryBuilder $queryBuilder ) | ||
$queryBuilder | Doctrine\ORM\QueryBuilder |
protected assignJoins ( Doctrine\ORM\QueryBuilder $queryBuilder, array $joins = null ) | ||
$queryBuilder | Doctrine\ORM\QueryBuilder | |
$joins | array |
protected assignSortFields ( Doctrine\ORM\QueryBuilder $queryBuilder ) | ||
$queryBuilder | Doctrine\ORM\QueryBuilder |
public createAndExpression ( array $expressions ) | ||
$expressions | array |
public createBetweenExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values ) | ||
$fieldDescriptor | Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface | |
$values | array |
public createInExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values ) | ||
$fieldDescriptor | Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface | |
$values | array |
public createOrExpression ( array $expressions ) | ||
$expressions | array |
protected createQueryBuilder ( array | null $joins = null ) : Doctrine\ORM\QueryBuilder | ||
$joins | array | null | Define which joins should be made |
return | Doctrine\ORM\QueryBuilder |
protected createSubQueryBuilder ( null | string $select = null ) : Doctrine\ORM\QueryBuilder | ||
$select | null | string | |
return | Doctrine\ORM\QueryBuilder |
public createWhereExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value, $comparator ) | ||
$fieldDescriptor | Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface |
protected findIdsByGivenCriteria ( ) : array | ||
return | array |
protected getAllFieldNames ( |
||
$expressions | ||
return | array |
protected getAllFields ( boolean $onlyReturnFilterFields = false ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] | ||
$onlyReturnFilterFields | boolean | Define if only filtering FieldDescriptors should be returned |
return | Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] |
protected getEntityNamesOfFieldDescriptors ( array $filterFields ) : string[] | ||
$filterFields | array | |
return | string[] |
protected getJoins ( ) : |
||
return |
protected getNecessaryJoins ( string[] $necessaryEntityNames ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] | ||
$necessaryEntityNames | string[] | |
return | Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] |
protected getUniqueExpressionFieldDescriptors ( array $expressions ) : array | ||
$expressions | array | |
return | array |
protected hasSelectStatement ( Doctrine\ORM\QueryBuilder $queryBuilder, $statement ) | ||
$queryBuilder | Doctrine\ORM\QueryBuilder |
public setIdField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $idField ) | ||
$idField | Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface |
protected array $expressionFields | ||
return | array |
protected AbstractDoctrineExpression[],Sulu\Component\Rest\ListBuilder\Expression\Doctrine $expressions | ||
return |
protected QueryBuilder,Doctrine\ORM $queryBuilder | ||
return | Doctrine\ORM\QueryBuilder |
protected DoctrineFieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $searchFields | ||
return | Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[] |