PHP Class Sulu\Component\Rest\Listing\ListQueryBuilder

Deprecation:
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( $associationNames, $fieldNames, $entityName, $fields, $sorting, $where, array $searchTextFields = [], array $searchNumberFields = [], array $joinConditions = [] )
find ( string $prefix = 'u' ) : string Searches Entity by filter for fields, pagination and sorted by a column.
getRelationalFilters ( ) : mixed
justCount ( $countAttribute = 'u.id', $alias = 'totalcount' ) just return count.

Private Methods

Method Description
addToSelect ( string $prefix, string $field, string $alias = '' ) Add {prefix}.{field} {alias} to select string.
generateJoin ( string $parent, string $field, string $alias ) : string Generate JOIN {parent}.{fieldname} {alias}.
generateJoinCondition ( $field ) : string generates the join condition.
generateJoins ( array $fieldParts, string $prefix ) : string Generate JOIN {parent}.{fieldname} {alias} foreach fieldPart.
generateSelect ( string $prefix, string $field, string $alias = '' ) : string Generate {prefix}.{field} {alias}.
getOrderBy ( string $prefix ) : string Get DQL for Sorting.
getSelectFrom ( string $prefix = 'u' ) : string Create a Select .
getWhere ( string $prefix ) : string Get DQL for Where clause.
isRelation ( string $field ) : boolean Check if Field is an Association.
performSelectFromField ( string $field, string $prefix = 'u' ) solves the relations for a single field and generate dql for select and joins.

Method Details

__construct() public method

public __construct ( $associationNames, $fieldNames, $entityName, $fields, $sorting, $where, array $searchTextFields = [], array $searchNumberFields = [], array $joinConditions = [] )
$associationNames
$fieldNames
$entityName
$fields
$sorting
$where
$searchTextFields array
$searchNumberFields array
$joinConditions array - specify a custom join condition

find() public method

Searches Entity by filter for fields, pagination and sorted by a column.
public find ( string $prefix = 'u' ) : string
$prefix string Prefix for starting Table
return string

getRelationalFilters() public method

public getRelationalFilters ( ) : mixed
return mixed

justCount() public method

just return count.
public justCount ( $countAttribute = 'u.id', $alias = 'totalcount' )