PHP 클래스 Sulu\Component\Rest\ListBuilder\Doctrine\DoctrineListBuilder

상속: extends Sulu\Component\Rest\ListBuilder\AbstractListBuilder
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$expressionFields array Array of unique field descriptors from expressions.
$expressions Sulu\Component\Rest\ListBuilder\Expression\Doctrine\AbstractDoctrineExpression[]
$queryBuilder Doctrine\ORM\QueryBuilder
$searchFields Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]
$selectFields Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]

공개 메소드들

메소드 설명
__construct ( EntityManager $em, $entityName, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, array $permissions )
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.

보호된 메소드들

메소드 설명
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 ( AbstractDoctrineExpression[] $expressions ) : array 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 ( ) : DoctrineJoinDescriptor[] 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 )

메소드 상세

__construct() 공개 메소드

public __construct ( EntityManager $em, $entityName, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, array $permissions )
$em Doctrine\ORM\EntityManager
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$permissions array

assignGroupBy() 보호된 메소드

Sets group by fields to querybuilder.
protected assignGroupBy ( Doctrine\ORM\QueryBuilder $queryBuilder )
$queryBuilder Doctrine\ORM\QueryBuilder

assignJoins() 보호된 메소드

Adds joins to querybuilder.
protected assignJoins ( Doctrine\ORM\QueryBuilder $queryBuilder, array $joins = null )
$queryBuilder Doctrine\ORM\QueryBuilder
$joins array

assignSortFields() 보호된 메소드

Assigns ORDER BY clauses to querybuilder.
protected assignSortFields ( Doctrine\ORM\QueryBuilder $queryBuilder )
$queryBuilder Doctrine\ORM\QueryBuilder

count() 공개 메소드

public count ( )

createAndExpression() 공개 메소드

public createAndExpression ( array $expressions )
$expressions array

createBetweenExpression() 공개 메소드

public createBetweenExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface
$values array

createInExpression() 공개 메소드

public createInExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface
$values array

createOrExpression() 공개 메소드

public createOrExpression ( array $expressions )
$expressions array

createQueryBuilder() 보호된 메소드

Creates Querybuilder.
protected createQueryBuilder ( array | null $joins = null ) : Doctrine\ORM\QueryBuilder
$joins array | null Define which joins should be made
리턴 Doctrine\ORM\QueryBuilder

createSubQueryBuilder() 보호된 메소드

Creates a query-builder for sub-selecting ID's.
protected createSubQueryBuilder ( null | string $select = null ) : Doctrine\ORM\QueryBuilder
$select null | string
리턴 Doctrine\ORM\QueryBuilder

createWhereExpression() 공개 메소드

public createWhereExpression ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value, $comparator )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

distinct() 공개 메소드

Eliminates duplicated rows.
public distinct ( boolean $flag = true )
$flag boolean

execute() 공개 메소드

public execute ( )

findIdsByGivenCriteria() 보호된 메소드

Function that finds all IDs of entities that match the search criteria.
protected findIdsByGivenCriteria ( ) : array
리턴 array

getAllFieldNames() 보호된 메소드

Returns all fieldnames used in the expressions.
protected getAllFieldNames ( AbstractDoctrineExpression[] $expressions ) : array
$expressions Sulu\Component\Rest\ListBuilder\Expression\Doctrine\AbstractDoctrineExpression[]
리턴 array

getAllFields() 보호된 메소드

Returns all FieldDescriptors that were passed to list builder.
protected getAllFields ( boolean $onlyReturnFilterFields = false ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]
$onlyReturnFilterFields boolean Define if only filtering FieldDescriptors should be returned
리턴 Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]

getEntityNamesOfFieldDescriptors() 보호된 메소드

Returns array of field-descriptor aliases.
protected getEntityNamesOfFieldDescriptors ( array $filterFields ) : string[]
$filterFields array
리턴 string[]

getJoins() 보호된 메소드

Returns all the joins required for the query.
protected getJoins ( ) : DoctrineJoinDescriptor[]
리턴 Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineJoinDescriptor[]

getNecessaryJoins() 보호된 메소드

Function returns all necessary joins for filtering result.
protected getNecessaryJoins ( string[] $necessaryEntityNames ) : Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]
$necessaryEntityNames string[]
리턴 Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]

getUniqueExpressionFieldDescriptors() 보호된 메소드

Returns an array of unique expression field descriptors.
protected getUniqueExpressionFieldDescriptors ( array $expressions ) : array
$expressions array
리턴 array

hasSelectStatement() 보호된 메소드

protected hasSelectStatement ( Doctrine\ORM\QueryBuilder $queryBuilder, $statement )
$queryBuilder Doctrine\ORM\QueryBuilder

setIdField() 공개 메소드

Set id-field of the "root" entity.
public setIdField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $idField )
$idField Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

프로퍼티 상세

$expressionFields 보호되어 있는 프로퍼티

Array of unique field descriptors from expressions.
protected array $expressionFields
리턴 array

$expressions 보호되어 있는 프로퍼티

protected AbstractDoctrineExpression[],Sulu\Component\Rest\ListBuilder\Expression\Doctrine $expressions
리턴 Sulu\Component\Rest\ListBuilder\Expression\Doctrine\AbstractDoctrineExpression[]

$queryBuilder 보호되어 있는 프로퍼티

protected QueryBuilder,Doctrine\ORM $queryBuilder
리턴 Doctrine\ORM\QueryBuilder

$searchFields 보호되어 있는 프로퍼티

protected DoctrineFieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $searchFields
리턴 Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]

$selectFields 보호되어 있는 프로퍼티

protected DoctrineFieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor $selectFields
리턴 Sulu\Component\Rest\ListBuilder\Doctrine\FieldDescriptor\DoctrineFieldDescriptorInterface[]