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_FULFILLED
public
mixed
STATUS_FULFILLED
= \CSRuleConst::STATUS_FULFILLED
Tags
STATUS_NOT_EXECUTED
Defines the available condition status.
public
int
STATUS_NOT_EXECUTED
= \CSRuleConst::STATUS_NOT_EXECUTED
Tags
STATUS_NOT_FULFILLED
public
mixed
STATUS_NOT_FULFILLED
= \CSRuleConst::STATUS_NOT_FULFILLED
Tags
STATUS_WARNING
public
mixed
STATUS_WARNING
= \CSRuleConst::STATUS_WARNING
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 —getRuleCondition()
Returns the rule condition of the current condition result.
public
getRuleCondition() : CSRuleApiCondition
Tags
Return values
CSRuleApiCondition —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
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
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.
