class ConditionFactory

Manage how Condition could interact with the current application state (Thelia)

Methods

__construct( ContainerInterface $container)

Constructor

string
serializeConditionCollection( ConditionCollection $collection)

Serialize a collection of conditions

unserializeConditionCollection( string $serializedConditions)

Unserialize a collection of conditions

build( string $conditionServiceId, array $operators, array $values)

Build a Condition from form

array
getInputsFromServiceId( string $conditionServiceId)

Get Condition inputs from serviceId

array
getInputsFromConditionInterface( ConditionInterface $condition)

Get Condition inputs from serviceId

Details

at line 42
__construct( ContainerInterface $container)

Constructor

Parameters

ContainerInterface $container Service container

at line 55
string serializeConditionCollection( ConditionCollection $collection)

Serialize a collection of conditions

Parameters

ConditionCollection $collection A collection of conditions

Return Value

string A ready to be stored Condition collection

at line 80
ConditionCollection unserializeConditionCollection( string $serializedConditions)

Unserialize a collection of conditions

Parameters

string $serializedConditions Serialized Conditions

Return Value

ConditionCollection Conditions ready to be processed

at line 114
ConditionInterface build( string $conditionServiceId, array $operators, array $values)

Build a Condition from form

Parameters

string $conditionServiceId Condition class name
array $operators Condition Operator (<, >, = )
array $values Values setting this Condition

Return Value

ConditionInterface Ready to use Condition or false

Exceptions

InvalidArgumentException

at line 134
array getInputsFromServiceId( string $conditionServiceId)

Get Condition inputs from serviceId

Parameters

string $conditionServiceId ConditionManager class name

Return Value

array Ready to be drawn condition inputs

at line 153
array getInputsFromConditionInterface( ConditionInterface $condition)

Get Condition inputs from serviceId

Parameters

ConditionInterface $condition ConditionManager

Return Value

array Ready to be drawn condition inputs