19 declare(strict_types=1);
45 "user_action_activation",
47 "context_comp" => [
"text", $context_comp],
48 "context_id" => [
"text", $context_id],
49 "action_comp" => [
"text", $action_comp],
50 "action_type" => [
"text", $action_type],
53 "active" => [
"integer", $active]
57 $this->data[$context_comp][$context_id][$action_comp][$action_type] = $active;
67 !isset($this->data[$context_comp])
68 || !isset($this->data[$context_comp][$context_id])
69 || !isset($this->data[$context_comp][$context_id][$action_comp])
70 || !isset($this->data[$context_comp][$context_id][$action_comp][$action_type])
74 return $this->data[$context_comp][$context_id][$action_comp][$action_type];
80 $set = $this->db->query(
"SELECT * FROM user_action_activation");
81 while ($rec = $this->db->fetchAssoc($set)) {
82 $data[$rec[
"context_comp"]][$rec[
"context_id"]][$rec[
"action_comp"]][$rec[
"action_type"]] = (bool) $rec[
"active"];
__construct(private ilDBInterface $db)
User action administration.
activateAction(string $context_comp, string $context_id, string $action_comp, string $action_type, bool $active)
isActionActive(string $context_comp, string $context_id, string $action_comp, string $action_type)