Contentserv PHP API

CSRuleApiConditionResult
in package

Tags

Table of Contents

STATUS_FULFILLED  = \CSRuleConst::STATUS_FULFILLED
STATUS_NOT_EXECUTED  = \CSRuleConst::STATUS_NOT_EXECUTED
Defines the available condition status.
STATUS_NOT_FULFILLED  = \CSRuleConst::STATUS_NOT_FULFILLED
STATUS_WARNING  = \CSRuleConst::STATUS_WARNING
createResult()  : CSRuleApiConditionResult
Initializes a rule condition result API object.
getInvalidAttributeIds()  : array<string|int, mixed>
Returns the defined invalid attributes of the condition result.
getLanguageId()  : int|null
Returns the condition result language id.
getRuleCondition()  : CSRuleApiCondition
Returns the rule condition of the current condition result.
getRuleConditionId()  : int
Returns the rule condition id of the current condition result.
getRuleContext()  : CSRuleContext
Returns the rule context of the current condition result.
getStatus()  : int
Returns the condition result status.
getValidAttributeIds()  : array<string|int, mixed>
Returns the defined invalid attributes of the condition result.
setAttributeIdBasedOnAttributeResult()  : bool
Sets an attribute to the valid or invalid attribute ids of the result depending on the given attribute result.
setFulfilled()  : bool
Sets the condition result status to fulfilled or not fulfilled.
setInvalidAttributeId()  : bool
Sets an invalid attribute which caused that the condition failed.
setStatus()  : bool
Sets the condition result status.
setValidAttributeId()  : bool
Sets an invalid attribute which caused that the condition failed.

Constants

STATUS_NOT_EXECUTED

Defines the available condition status.

public int STATUS_NOT_EXECUTED = \CSRuleConst::STATUS_NOT_EXECUTED
Tags

Methods

createResult()

Initializes a rule condition result API object.

public static createResult(CSRuleApiCondition $oRuleCondition, CSRuleContext $oRuleContext, int $iLanguageId) : CSRuleApiConditionResult
Parameters
$oRuleCondition : CSRuleApiCondition

The current condition of the condition result.

$oRuleContext : CSRuleContext

The current rule context of the condition result.

$iLanguageId : int

The current language id of the condition result.

Tags
Return values
CSRuleApiConditionResult

getInvalidAttributeIds()

Returns the defined invalid attributes of the condition result.

public getInvalidAttributeIds() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

with the defined invalid attributes of the condition result.

getLanguageId()

Returns the condition result language id.

public getLanguageId() : int|null
Tags
Return values
int|null

getRuleConditionId()

Returns the rule condition id of the current condition result.

public getRuleConditionId() : int
Tags
Return values
int

with the rule condition id of the current condition result.

getRuleContext()

Returns the rule context of the current condition result.

public getRuleContext() : CSRuleContext
Tags
Return values
CSRuleContext

getStatus()

Returns the condition result status.

public getStatus() : int

Please see the constants STATUS_* for the available result status.

Tags
Return values
int

with the condition result status.

getValidAttributeIds()

Returns the defined invalid attributes of the condition result.

public getValidAttributeIds() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

with the defined invalid attributes of the condition result.

setAttributeIdBasedOnAttributeResult()

Sets an attribute to the valid or invalid attribute ids of the result depending on the given attribute result.

public setAttributeIdBasedOnAttributeResult(mixed $mAttributeId, bool $bAttributeResult) : bool
Parameters
$mAttributeId : mixed

The attribute id which should be set to the result.

$bAttributeResult : bool

The result of the attribute in the condition execution.

Tags
throws
CSRuleException

If the given attribute id already exists in the valid attribute definition.

Return values
bool

setFulfilled()

Sets the condition result status to fulfilled or not fulfilled.

public setFulfilled(bool $bIsFulfilled) : bool

If you want to set a different status please use the method "setStatus".

Parameters
$bIsFulfilled : bool

Whether the condition is fulfilled or not fulfilled.

Tags
Return values
bool

if the status could be set successfully.

setInvalidAttributeId()

Sets an invalid attribute which caused that the condition failed.

public setInvalidAttributeId(mixed $mAttributeId) : bool
Parameters
$mAttributeId : mixed

The attribute id which should be set to the result.

Tags
throws
CSRuleException

If the given attribute id already exists in the valid attribute definition.

Return values
bool

setStatus()

Sets the condition result status.

public setStatus(int $iStatus) : bool
Parameters
$iStatus : int

The condition status. Use the existing constants: STATUS_*

Tags
Return values
bool

if the status could be set successfully.

setValidAttributeId()

Sets an invalid attribute which caused that the condition failed.

public setValidAttributeId(mixed $mAttributeId) : bool
Parameters
$mAttributeId : mixed

The attribute id which should be set to the result.

Tags
throws
CSRuleException

If the given attribute id already exists in the invalid attribute definition.

Return values
bool

        

Search results