List of all members.

Public Member Functions

 getForbiddenStandardMassiveAction ()
 __construct ($rule_type='Rule')
 getName ($options=array())
 prepareInputForAdd ($input)
 post_addItem ()
 Actions done after the ADD of the item in the database.
 post_purgeItem ()
 Actions done after the PURGE of the item in the database.
 getSearchOptions ()
 Get the Search options for the given Type.
 getRuleActions ($ID)
 Get all actions for a given rule.
 addActionByAttributes ($action, $ruleid, $field, $value)
 Add an action.
 getAlreadyUsedForRuleID ($rules_id, $sub_type)
 displayActionSelectPattern ($options=array())

Static Public Member Functions

static getTypeName ($nb=0)
 Get title used in rule.
static getSpecificValueToDisplay ($field, $values, array $options=array())
static getSpecificValueToSelect ($field, $name='', $values='', array $options=array())
static dropdownActions ($sub_type, $name, $value='', $already_used=false, $display=true)
 Display a dropdown with all the possible actions.
static getActions ()
static getActionByID ($ID)
static getRegexResultById ($action, $regex_result)

Public Attributes

 $dohistory = true
 Make an history of the changes.

Static Public Attributes

static $items_id = 'rules_id'

Detailed Description

Definition at line 37 of file ruleaction.class.php.


Constructor & Destructor Documentation

__construct ( rule_type = 'Rule')
Parameters:
$rule_type

Definition at line 58 of file ruleaction.class.php.

References $itemtype.


Member Function Documentation

addActionByAttributes ( action,
ruleid,
field,
value 
)

Add an action.

Parameters:
$actionaction type
$ruleidrule ID
$fieldfield name
$valuevalue

Definition at line 283 of file ruleaction.class.php.

References $field, $input, $items_id, and CommonDBTM\add().

static dropdownActions ( sub_type,
name,
value = '',
already_used = false,
display = true 
) [static]

Display a dropdown with all the possible actions.

Parameters:
$sub_type
$name
$value(default '')
$already_used(default false)
$display(true by default)

Definition at line 302 of file ruleaction.class.php.

References $actions, $display, $name, $rule, getActionByID(), getItemForItemtype(), and Dropdown\showFromArray().

Referenced by getSpecificValueToSelect().

static getActionByID ( ID) [static]
Parameters:
$ID

Definition at line 353 of file ruleaction.class.php.

References $actions, and getActions().

Referenced by dropdownActions(), Rule\getMinimalActionText(), and getSpecificValueToDisplay().

static getActions ( ) [static]

Definition at line 333 of file ruleaction.class.php.

References __().

Referenced by getActionByID().

getAlreadyUsedForRuleID ( rules_id,
sub_type 
)
Parameters:
$rules_id
$sub_type

Definition at line 388 of file ruleaction.class.php.

References $actions, $DB, $res, $rule, getItemForItemtype(), and CommonDBTM\getTable().

Since:
version 0.84

Reimplemented from CommonDBTM.

Definition at line 47 of file ruleaction.class.php.

getName ( options = array())
See also:
CommonDBTM::getName()

Reimplemented from CommonDBTM.

Definition at line 78 of file ruleaction.class.php.

References $itemtype, $rule, Html\clean(), and getItemForItemtype().

static getRegexResultById ( action,
regex_result 
) [static]
getRuleActions ( ID)

Get all actions for a given rule.

Parameters:
$IDthe rule_description ID
Returns:
an array of RuleAction objects

Definition at line 256 of file ruleaction.class.php.

References $DB, $result, $rule, and $sql.

Get the Search options for the given Type.

This should be overloaded in Class

Returns:
an array of search options More information on https://forge.indepnet.net/wiki/glpi/SearchEngine

Reimplemented from CommonDBTM.

Definition at line 116 of file ruleaction.class.php.

References __(), _n(), CommonDBTM\getTable(), and getTypeName().

static getSpecificValueToDisplay ( field,
values,
array $  options = array() 
) [static]
Since:
version 0.84
Parameters:
$field
$values
$optionsarray

Reimplemented from CommonDBTM.

Definition at line 152 of file ruleaction.class.php.

References $field, $options, $rule, $values, getActionByID(), and getItemForItemtype().

static getSpecificValueToSelect ( field,
name = '',
values = '',
array $  options = array() 
) [static]
Since:
version 0.84
Parameters:
$field
$name(default '')
$values(default '')
$optionsarray

TODO review it : need to pass display param and others...

Reimplemented from CommonDBTM.

Definition at line 199 of file ruleaction.class.php.

References $DB, $field, $name, $options, $rule, $values, displayActionSelectPattern(), dropdownActions(), and getItemForItemtype().

static getTypeName ( nb = 0) [static]

Get title used in rule.

Parameters:
$nbinteger (default 0)
Returns:
Title of the rule

Reimplemented from CommonGLPI.

Definition at line 70 of file ruleaction.class.php.

References $nb, and _n().

Referenced by getSearchOptions().

Actions done after the ADD of the item in the database.

Returns:
nothing

Reimplemented from CommonDBChild.

Definition at line 98 of file ruleaction.class.php.

References $_SESSION, and Rule\getRuleObjectByID().

Actions done after the PURGE of the item in the database.

Returns:
nothing

Reimplemented from CommonDBTM.

Definition at line 107 of file ruleaction.class.php.

References $_SESSION, and Rule\getRuleObjectByID().

prepareInputForAdd ( input)
Since:
version 0.84

Reimplemented from CommonDBChild.

Definition at line 90 of file ruleaction.class.php.

References $input.


Member Data Documentation

$dohistory = true

Make an history of the changes.

Reimplemented from CommonDBTM.

Reimplemented in SlaLevelAction.

Definition at line 41 of file ruleaction.class.php.

$items_id = 'rules_id' [static]

Reimplemented from CommonDBChild.

Reimplemented in SlaLevelAction.

Definition at line 40 of file ruleaction.class.php.

Referenced by addActionByAttributes().


The documentation for this class was generated from the following file: