PHP Class Sulu\Component\Rest\ListBuilder\AbstractListBuilder

Inheritance: implements Sulu\Component\Rest\ListBuilder\ListBuilderInterface
Show file Open project: sulu/sulu

Protected Properties

Property Type Description
$expressions Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface[]
$fieldDescriptors Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] All field descriptors for the current context.
$groupByFields array group by fields.
$limit integer The limit for this query.
$page integer The page the resulting query will be returning.
$permission string
$search string The value for which the searchfields will be searched.
$searchFields Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] The field descriptors for the field, which will be used for the search.
$selectFields Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] The field descriptors for the current list.
$sortFields Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[] The field descriptor for the field to sort.
$sortOrders string[] Defines the sort order of the string.
$user Sulu\Component\Security\Authentication\UserInterface

Public Methods

Method Description
addExpression ( Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface $expression )
addField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
addGroupBy ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
addSearchField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
addSelectField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
between ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values )
getCurrentPage ( )
getFieldDescriptor ( $fieldName )
getLimit ( )
getSelectField ( $fieldName )
hasField ( $name )
hasSelectField ( $name )
in ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $values )
limit ( $limit )
search ( $search )
setCurrentPage ( $page )
setFieldDescriptors ( array $fieldDescriptors )
setFields ( $fieldDescriptors )
setPermissionCheck ( Sulu\Component\Security\Authentication\UserInterface $user, $permission )
setSelectFields ( $fieldDescriptors )
sort ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $order = self::SORTORDER_ASC )
where ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value, $comparator = self::WHERE_COMPARATOR_EQUAL )
whereNot ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value )

Protected Methods

Method Description
addFieldDescriptor ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor ) Adds a field descriptor.
retrieveIndexOfFieldDescriptor ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $fieldDescriptors ) : boolean | integer | string Returns index of given FieldDescriptor in given array of descriptors.

Method Details

addExpression() public method

public addExpression ( Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface $expression )
$expression Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface

addField() public method

Deprecation: use addSelectField instead
public addField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

addFieldDescriptor() protected method

Adds a field descriptor.
protected addFieldDescriptor ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

addGroupBy() public method

public addGroupBy ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

addSearchField() public method

public addSearchField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

addSelectField() public method

public addSelectField ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

between() public method

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

getCurrentPage() public method

public getCurrentPage ( )

getFieldDescriptor() public method

public getFieldDescriptor ( $fieldName )

getLimit() public method

public getLimit ( )

getSelectField() public method

public getSelectField ( $fieldName )

hasField() public method

Deprecation: use hasSelectField instead
public hasField ( $name )

hasSelectField() public method

public hasSelectField ( $name )

in() public method

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

limit() public method

public limit ( $limit )

retrieveIndexOfFieldDescriptor() protected method

If no match is found, false will be returned.
protected retrieveIndexOfFieldDescriptor ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, array $fieldDescriptors ) : boolean | integer | string
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface
$fieldDescriptors array
return boolean | integer | string

setCurrentPage() public method

public setCurrentPage ( $page )

setFieldDescriptors() public method

public setFieldDescriptors ( array $fieldDescriptors )
$fieldDescriptors array

setFields() public method

Deprecation: use setSelectFields instead
public setFields ( $fieldDescriptors )

setPermissionCheck() public method

public setPermissionCheck ( Sulu\Component\Security\Authentication\UserInterface $user, $permission )
$user Sulu\Component\Security\Authentication\UserInterface

setSelectFields() public method

public setSelectFields ( $fieldDescriptors )

sort() public method

public sort ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $order = self::SORTORDER_ASC )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

where() public method

public where ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value, $comparator = self::WHERE_COMPARATOR_EQUAL )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

whereNot() public method

Deprecation: use where instead {@inheritdoc}
public whereNot ( Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface $fieldDescriptor, $value )
$fieldDescriptor Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface

Property Details

$expressions protected property

protected ExpressionInterface[],Sulu\Component\Rest\ListBuilder\Expression $expressions
return Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface[]

$fieldDescriptors protected property

All field descriptors for the current context.
protected FieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder $fieldDescriptors
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

$groupByFields protected property

group by fields.
protected array $groupByFields
return array

$limit protected property

The limit for this query.
protected int $limit
return integer

$page protected property

The page the resulting query will be returning.
protected int $page
return integer

$permission protected property

protected string $permission
return string

$searchFields protected property

The field descriptors for the field, which will be used for the search.
protected FieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder $searchFields
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

$selectFields protected property

The field descriptors for the current list.
protected FieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder $selectFields
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

$sortFields protected property

The field descriptor for the field to sort.
protected FieldDescriptorInterface[],Sulu\Component\Rest\ListBuilder $sortFields
return Sulu\Component\Rest\ListBuilder\FieldDescriptorInterface[]

$sortOrders protected property

Defines the sort order of the string.
protected string[] $sortOrders
return string[]

$user protected property

protected UserInterface,Sulu\Component\Security\Authentication $user
return Sulu\Component\Security\Authentication\UserInterface