Constants

PATTERN_IS_EMPTY

PATTERN_IS_EMPTY

PATTERN_ENTITY_RESTRICT

PATTERN_ENTITY_RESTRICT

RULE_ACTION_DENIED

RULE_ACTION_DENIED

Properties

$restrict_matching

$restrict_matching : \type

Define the matching only available

Type

\type

$right

$right : \type

Define the right name

Type

\type

$can_sort

$can_sort : \type

Set these rules can be sorted

Type

\type

Methods

getTitle()

getTitle() : string

Get name of this type by language of the user connected

Returns

string —

name of this type

maxActionsCount()

maxActionsCount() : integer

Define maximum number of actions possible in a rule

Returns

integer

getCriterias()

getCriterias() : array

Get the criteria available for the rule

Returns

array

getActions()

getActions() : array

Get the actions available for the rule

Returns

array

getRuleActionValues()

getRuleActionValues() : array

Get action values

Returns

array

displayAdditionRuleActionValue()

displayAdditionRuleActionValue(  $value) : string

Add more action values specific to this type of rule

Parameters

$value

Returns

string —

the label's value or ''

manageSpecificCriteriaValues()

manageSpecificCriteriaValues(array  $criteria, string  $name, string  $value) : boolean

Manage the specific criteria values

Parameters

array $criteria
string $name
string $value

Returns

boolean

addMoreCriteria()

addMoreCriteria(string  $criterion = '') : array

Add more criteria

Parameters

string $criterion

Returns

array

getAdditionalCriteriaDisplayPattern()

getAdditionalCriteriaDisplayPattern(integer  $ID, integer  $condition, string  $pattern) : string|false

Get additional criteria pattern

Parameters

integer $ID
integer $condition
string $pattern

Returns

string|false

displayAdditionalRuleCondition()

displayAdditionalRuleCondition(integer  $condition, string  $criteria, string  $name, string  $value, boolean  $test = FALSE) : boolean

Display more confitions

Parameters

integer $condition
string $criteria
string $name
string $value
boolean $test

Returns

boolean

displayAdditionalRuleAction()

displayAdditionalRuleAction(array  $action, string  $value = '') : boolean

Display more actions

Parameters

array $action
string $value

Returns

boolean

getCriteriaByID()

getCriteriaByID(string  $critname) : string

Get criteria by criteria name

Parameters

string $critname

Returns

string

findWithGlobalCriteria()

findWithGlobalCriteria(array  $input) : boolean

Find a device in GLPI

Parameters

array $input

Returns

boolean

executeActions()

executeActions(array  $output, array  $params) : array

Code execution of actions of the rule

Parameters

array $output
array $params

Returns

array

displayCriteriaSelectPattern()

displayCriteriaSelectPattern(string  $name, integer  $ID, integer  $condition, string  $value = "", boolean  $test = FALSE) : \type

Display the pattern form selection

Parameters

string $name
integer $ID
integer $condition
string $value
boolean $test

Returns

\type

getTypes()

getTypes() : array

Get itemtypes have state_type and unmanaged devices

Returns

array

showSpecificCriteriasForPreview()

showSpecificCriteriasForPreview(array  $fields) 

Display type specific criterias during rule's preview

Parameters

array $fields

preProcessPreviewResults()

preProcessPreviewResults(array  $output) : array

Make some changes before process review result

Parameters

array $output

Returns

array