15 protected static $data = array();
26 public static function activateAction($a_context_comp, $a_context_id, $a_action_comp, $a_action_type, $a_active)
30 $db = $DIC->database();
32 "user_action_activation",
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),
40 "active" => array(
"integer", $a_active))
43 self::$loaded =
false;
55 public static function lookupActive($a_context_comp, $a_context_id, $a_action_comp, $a_action_type)
60 return (
bool)
self::$data[$a_context_comp][$a_context_id][$a_action_comp][$a_action_type];
73 $db = $DIC->database();
75 $set = $db->query(
"SELECT * FROM user_action_activation");
77 while ($rec = $db->fetchAssoc($set)) {
78 self::$data[$rec[
"context_comp"]][$rec[
"context_id"]][$rec[
"action_comp"]][$rec[
"action_type"]] = (bool) $rec[
"active"];
static lookupActive($a_context_comp, $a_context_id, $a_action_comp, $a_action_type)
Is activated?
User action administration.
static loadData()
Load data.
static activateAction($a_context_comp, $a_context_id, $a_action_comp, $a_action_type, $a_active)
Activate action.