A condition define when a palette is used or not.

 Methods

Create a deep clone of the condition.

__clone() : void

Calculate how "strong" (aka "count of matches") this condition match the model and input parameters.

getMatchCount(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface|null $model, \ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag $input) : bool | int
If a value is present in the input parameter, that one overrides any existing value in the model. When the condition does not match at all or has not enough information for a decision, false must be returned. When the condition does match, it must return a numeric value, the value may be negative or positive and even zero.

Parameters

$model

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterfacenull

If given, selectors will be evaluated depending on the model.

$input

\ContaoCommunityAlliance\DcGeneral\Data\PropertyValueBag

If given, selectors will be evaluated depending on the input data.

Returns

boolint