Contentserv PHP API

CSRuleApiResult
in package

Tags

Table of Contents

STATUS_FULFILLED  = \CSRuleConst::STATUS_FULFILLED
STATUS_NOT_FULFILLED  = \CSRuleConst::STATUS_NOT_FULFILLED
STATUS_WARNING  = \CSRuleConst::STATUS_WARNING
Defines the three target options for the status fields.
createResult()  : CSRuleApiResult
Initializes the rule result API object with the success, failure and warning conditions.
getCriterionStatus()  : int
Returns the criterion status, fulfilled, not fulfilled or warning
getErrorCode()  : mixed
getErrorMessage()  : mixed
getFailureConditionCount()  : int
getFailureConditionCountForLanguage
getFailureConditions()  : array<string|int, CSRuleApiCondition>
getFailureConditionsForLanguage
getInvalidConditionAttributeIds()  : array<string|int, mixed>
Returns an array with the invalid attribute ids for each condition id.
getLanguageIds()  : array<string|int, mixed>
getRule()  : CSRuleApiRule
Returns the rule of the current rule result.
getRuleContext()  : CSRuleContext|null
Returns the rule context of the current rule result.
getSuccessConditionCount()  : int
getSuccessConditionCountForLanguage
getSuccessConditions()  : array<string|int, CSRuleApiCondition>
getSuccessConditionsForLanguage
getValidConditionAttributeIds()  : array<string|int, mixed>
Returns an array with the invalid attribute ids for each condition id.
getWarningConditionCount()  : int
Returns the count of warning conditions
getWarningConditions()  : array<string|int, CSRuleApiCondition>
Get the warning conditions
hasError()  : mixed
isCriterionFulfilled()  : bool
Returns whether the criterion is fulfilled or not.

Constants

STATUS_FULFILLED

public mixed STATUS_FULFILLED = \CSRuleConst::STATUS_FULFILLED
Tags

STATUS_NOT_FULFILLED

public mixed STATUS_NOT_FULFILLED = \CSRuleConst::STATUS_NOT_FULFILLED
Tags

STATUS_WARNING

Defines the three target options for the status fields.

public int STATUS_WARNING = \CSRuleConst::STATUS_WARNING
Tags

Methods

createResult()

Initializes the rule result API object with the success, failure and warning conditions.

public static createResult([CSRuleApiRule|null $oRule = null ][, CSRuleContext|null $oContext = null ][, false $bForPreConditions = false ][, array<string|int, mixed> $aAllowedLanguageIds = array() ][, array<string|int, mixed> $aSuccessConditionResults = array() ][, array<string|int, mixed> $aFailureConditionResults = array() ][, array<string|int, mixed> $aWarningConditionResults = array() ], int $iErrorCode[, string $sErrorMessage = '' ]) : CSRuleApiResult
Parameters
$oRule : CSRuleApiRule|null = null

The rule which has been executed.

$oContext : CSRuleContext|null = null

The used context of the rule execution.

$bForPreConditions : false = false

If the rule result will be created for pre conditions.

$aAllowedLanguageIds : array<string|int, mixed> = array()

Defines the allowed language ids.

$aSuccessConditionResults : array<string|int, mixed> = array()

The success condition results.

$aFailureConditionResults : array<string|int, mixed> = array()

The failure condition results.

$aWarningConditionResults : array<string|int, mixed> = array()

The warning condition results.

$iErrorCode : int

The error code of the condition result.

$sErrorMessage : string = ''

The error message of the condition result.

Tags
Return values
CSRuleApiResult

getCriterionStatus()

Returns the criterion status, fulfilled, not fulfilled or warning

public getCriterionStatus([int|null $iLanguageId = null ]) : int
Parameters
$iLanguageId : int|null = null

The language id

Tags
Return values
int

the criterion status

getErrorCode()

public getErrorCode() : mixed
Tags
Return values
mixed

getErrorMessage()

public getErrorMessage() : mixed
Tags
Return values
mixed

getFailureConditionCount()

getFailureConditionCountForLanguage

public getFailureConditionCount([mixed $iLanguageId = null ]) : int
Parameters
$iLanguageId : mixed = null
Tags
Return values
int

getFailureConditions()

getFailureConditionsForLanguage

public getFailureConditions([int $iLanguageId = null ]) : array<string|int, CSRuleApiCondition>
Parameters
$iLanguageId : int = null
Tags
Return values
array<string|int, CSRuleApiCondition>

getInvalidConditionAttributeIds()

Returns an array with the invalid attribute ids for each condition id.

public getInvalidConditionAttributeIds([int|null $iLanguageId = null ][, int|null $iConditionId = null ]) : array<string|int, mixed>

Format: array({CONDITION_ID} => array({ATTRIBUTE_ID}, {ATTRIBUTE_ID}))

If a condition id is given it returns directly the attribute ids array.

Parameters
$iLanguageId : int|null = null

The language ID

$iConditionId : int|null = null

The target condition id

Tags
Return values
array<string|int, mixed>

with the invalid attribute ids for each condition id.

getLanguageIds()

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

getRule()

Returns the rule of the current rule result.

public getRule() : CSRuleApiRule
Tags
Return values
CSRuleApiRule

getRuleContext()

Returns the rule context of the current rule result.

public getRuleContext() : CSRuleContext|null
Tags
Return values
CSRuleContext|null

getSuccessConditionCount()

getSuccessConditionCountForLanguage

public getSuccessConditionCount([int $iLanguageId = null ]) : int
Parameters
$iLanguageId : int = null
Tags
Return values
int

getSuccessConditions()

getSuccessConditionsForLanguage

public getSuccessConditions([int $iLanguageId = null ]) : array<string|int, CSRuleApiCondition>
Parameters
$iLanguageId : int = null
Tags
Return values
array<string|int, CSRuleApiCondition>

getValidConditionAttributeIds()

Returns an array with the invalid attribute ids for each condition id.

public getValidConditionAttributeIds([int|null $iLanguageId = null ][, int|null $iConditionId = null ]) : array<string|int, mixed>

Format: array({CONDITION_ID} => array({ATTRIBUTE_ID}, {ATTRIBUTE_ID}))

If a condition id is given it returns directly the attribute ids array.

Parameters
$iLanguageId : int|null = null

The language ID

$iConditionId : int|null = null

The target condition id

Tags
Return values
array<string|int, mixed>

with the invalid attribute ids for each condition id.

getWarningConditionCount()

Returns the count of warning conditions

public getWarningConditionCount([int|null $iLanguageId = null ]) : int
Parameters
$iLanguageId : int|null = null

The language ID

Tags
Return values
int

the number of warning conditions

getWarningConditions()

Get the warning conditions

public getWarningConditions([int $iLanguageId = null ]) : array<string|int, CSRuleApiCondition>
Parameters
$iLanguageId : int = null

the language ID

Tags
Return values
array<string|int, CSRuleApiCondition>

array with warning conditions

isCriterionFulfilled()

Returns whether the criterion is fulfilled or not.

public isCriterionFulfilled([int|null $iLanguageId = null ]) : bool
Parameters
$iLanguageId : int|null = null

The language id

Tags
deprecated

Use instead

Return values
bool

whether the criterion is fulfilled or not.


        

Search results