PHP Класс Sulu\Component\Rest\Listing\ListQueryBuilder

Устаревший:
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Searches Entity by filter for fields, pagination and sorted by a column.
public find ( string $prefix = 'u' ) : string
$prefix string Prefix for starting Table
Результат string

getRelationalFilters() публичный Метод

public getRelationalFilters ( ) : mixed
Результат mixed

justCount() публичный Метод

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