ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUserActionAdmin Class Reference

User action administration. More...

+ Collaboration diagram for ilUserActionAdmin:

Static Public Member Functions

static activateAction ($a_context_comp, $a_context_id, $a_action_comp, $a_action_type, $a_active)
 Activate action. More...
 
static lookupActive ($a_context_comp, $a_context_id, $a_action_comp, $a_action_type)
 Is activated? More...
 

Static Protected Member Functions

static loadData ()
 Load data. More...
 

Static Protected Attributes

static $loaded = false
 
static $data = array()
 

Detailed Description

User action administration.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilUserActionAdmin.php.

Member Function Documentation

◆ activateAction()

static ilUserActionAdmin::activateAction (   $a_context_comp,
  $a_context_id,
  $a_action_comp,
  $a_action_type,
  $a_active 
)
static

Activate action.

Parameters
string$a_context_comp
string$a_context_id
string$a_action_comp
string$a_action_type
bool$a_activeactive true/false

Definition at line 26 of file class.ilUserActionAdmin.php.

References $a_context_id, and $DIC.

Referenced by ilUserActionAdminGUI\save().

27  {
28  global $DIC;
29 
30  $db = $DIC->database();
31  $db->replace(
32  "user_action_activation",
33  array(
34  "context_comp" => array("text", $a_context_comp),
35  "context_id" => array("text", $a_context_id),
36  "action_comp" => array("text", $a_action_comp),
37  "action_type" => array("text", $a_action_type),
38  ),
39  array(
40  "active" => array("integer", $a_active))
41  );
42 
43  self::$loaded = false;
44  }
global $DIC
Definition: saml.php:7
$a_context_id
Definition: workflow.php:97
+ Here is the caller graph for this function:

◆ loadData()

static ilUserActionAdmin::loadData ( )
staticprotected

Load data.

Parameters

Definition at line 69 of file class.ilUserActionAdmin.php.

References $data, and $DIC.

70  {
71  global $DIC;
72 
73  $db = $DIC->database();
74 
75  $set = $db->query("SELECT * FROM user_action_activation");
76  self::$data = array();
77  while ($rec = $db->fetchAssoc($set)) {
78  self::$data[$rec["context_comp"]][$rec["context_id"]][$rec["action_comp"]][$rec["action_type"]] = (bool) $rec["active"];
79  }
80 
81  self::$loaded = true;
82  }
global $DIC
Definition: saml.php:7
$data
Definition: bench.php:6

◆ lookupActive()

static ilUserActionAdmin::lookupActive (   $a_context_comp,
  $a_context_id,
  $a_action_comp,
  $a_action_type 
)
static

Is activated?

Parameters
string$a_context_comp
string$a_context_id
string$a_action_comp
string$a_action_type
Returns
bool active true/false

Definition at line 55 of file class.ilUserActionAdmin.php.

References $a_context_id, and $data.

Referenced by ilUserActionAdminGUI\getActions(), ilUserActionCollector\getActionsForTargetUser(), and ilUserActionGUI\init().

56  {
57  if (!self::$loaded) {
58  self::loadData();
59  }
60  return (bool) self::$data[$a_context_comp][$a_context_id][$a_action_comp][$a_action_type];
61  }
$a_context_id
Definition: workflow.php:97
$data
Definition: bench.php:6
+ Here is the caller graph for this function:

Field Documentation

◆ $data

ilUserActionAdmin::$data = array()
staticprotected

Definition at line 15 of file class.ilUserActionAdmin.php.

◆ $loaded

ilUserActionAdmin::$loaded = false
staticprotected

Definition at line 14 of file class.ilUserActionAdmin.php.


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