PHP Class Sulu\Bundle\ResourceBundle\Resource\FilterListBuilder

Inheritance: implements Sulu\Bundle\ResourceBundle\Resource\FilterListBuilderInterface
Exibir arquivo Open project: sulu/sulu

Protected Properties

Property Type Description
$expressions Sulu\Component\Rest\ListBuilder\Expression\ExpressionInterface[]
$filterManager Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface
$listBuilder Sulu\Component\Rest\ListBuilder\ListBuilderInterface
$requestStack Symfony\Component\HttpFoundation\RequestStack

Public Methods

Method Description
__construct ( Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface $manager, Symfony\Component\HttpFoundation\RequestStack $requestStack )
applyFilterToList ( Sulu\Component\Rest\ListBuilder\ListBuilderInterface $listBuilder )

Protected Methods

Method Description
createConjunctionExpression ( array $expressions, string $conjunction ) : Sulu\Component\Rest\ListBuilder\Expression\ConjunctionExpressionInterface Creates a conjunction expression based on the given expressions and conjunction.
createExpression ( Condition $condition, Sulu\Component\Rest\ListBuilder\AbstractFieldDescriptor $fieldDescriptor ) Creates expressions from conditions and add them to the expressions array.
getBoolean ( $value ) : boolean Returns boolean value if value is 1, true or "true" otherwise false is returned.
getValue ( Condition $condition ) : mixed Parses and returns the value of a condition.
handleCreatedExpressions ( array $expressions, string $conjunction ) Handles the previouse created expressions and passes the over to the listbuilder.
processConditionGroup ( ConditionGroup $conditionGroup ) Creates a conditions for a condition group.

Method Details

__construct() public method

public __construct ( Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface $manager, Symfony\Component\HttpFoundation\RequestStack $requestStack )
$manager Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface
$requestStack Symfony\Component\HttpFoundation\RequestStack

applyFilterToList() public method

public applyFilterToList ( Sulu\Component\Rest\ListBuilder\ListBuilderInterface $listBuilder )
$listBuilder Sulu\Component\Rest\ListBuilder\ListBuilderInterface

createConjunctionExpression() protected method

Creates a conjunction expression based on the given expressions and conjunction.
protected createConjunctionExpression ( array $expressions, string $conjunction ) : Sulu\Component\Rest\ListBuilder\Expression\ConjunctionExpressionInterface
$expressions array
$conjunction string
return Sulu\Component\Rest\ListBuilder\Expression\ConjunctionExpressionInterface

createExpression() protected method

Creates expressions from conditions and add them to the expressions array.
protected createExpression ( Condition $condition, Sulu\Component\Rest\ListBuilder\AbstractFieldDescriptor $fieldDescriptor )
$condition Sulu\Bundle\ResourceBundle\Api\Condition
$fieldDescriptor Sulu\Component\Rest\ListBuilder\AbstractFieldDescriptor

getBoolean() protected method

Returns boolean value if value is 1, true or "true" otherwise false is returned.
protected getBoolean ( $value ) : boolean
$value
return boolean

getValue() protected method

Parses and returns the value of a condition.
protected getValue ( Condition $condition ) : mixed
$condition Sulu\Bundle\ResourceBundle\Api\Condition
return mixed

handleCreatedExpressions() protected method

Handles the previouse created expressions and passes the over to the listbuilder.
protected handleCreatedExpressions ( array $expressions, string $conjunction )
$expressions array
$conjunction string

processConditionGroup() protected method

Creates a conditions for a condition group.
protected processConditionGroup ( ConditionGroup $conditionGroup )
$conditionGroup Sulu\Bundle\ResourceBundle\Api\ConditionGroup

Property Details

$expressions protected_oe property

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

$filterManager protected_oe property

protected FilterManagerInterface,Sulu\Bundle\ResourceBundle\Resource $filterManager
return Sulu\Bundle\ResourceBundle\Resource\FilterManagerInterface

$listBuilder protected_oe property

protected ListBuilderInterface,Sulu\Component\Rest\ListBuilder $listBuilder
return Sulu\Component\Rest\ListBuilder\ListBuilderInterface

$requestStack protected_oe property

protected RequestStack,Symfony\Component\HttpFoundation $requestStack
return Symfony\Component\HttpFoundation\RequestStack