ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilUIFilterServiceSessionGateway Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilUIFilterServiceSessionGateway:

Public Member Functions

 writeValue (string $filter_id, string $input_id, $value)
 Write session value for an input field. More...
 
 getValue (string $filter_id, string $input_id)
 
 writeRendered (string $filter_id, string $input_id, bool $value)
 
 isRendered (string $filter_id, string $input_id, bool $default)
 
 reset (string $filter_id)
 Resets filter to its default state. More...
 
 writeActivated (string $filter_id, bool $value)
 
 writeExpanded (string $filter_id, bool $value)
 
 isActivated (string $filter_id, bool $default)
 
 isExpanded (string $filter_id, bool $default)
 

Data Fields

const TYPE_VALUE = "value"
 
const TYPE_RENDERED = "rendered"
 
const TYPE_ACTIVATED = "activated"
 
const TYPE_EXPANDED = "expanded"
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Session data handling for filter ui service

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilUIFilterServiceSessionGateway.php.

Member Function Documentation

◆ getValue()

ilUIFilterServiceSessionGateway::getValue ( string  $filter_id,
string  $input_id 
)

Definition at line 43 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), and null.

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterInputValue().

44  {
45  $session = ilSession::get("ui");
46  if (isset($session["filter"][$filter_id][self::TYPE_VALUE][$input_id])) {
47  return unserialize($session["filter"][$filter_id][self::TYPE_VALUE][$input_id]);
48  }
49 
50  return null;
51  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActivated()

ilUIFilterServiceSessionGateway::isActivated ( string  $filter_id,
bool  $default 
)

Definition at line 94 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterActivated().

94  : bool
95  {
96  $session = ilSession::get("ui");
97  if (isset($session["filter"][$filter_id][self::TYPE_ACTIVATED])) {
98  return (bool) $session["filter"][$filter_id][self::TYPE_ACTIVATED];
99  }
100 
101  return $default;
102  }
static get(string $a_var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isExpanded()

ilUIFilterServiceSessionGateway::isExpanded ( string  $filter_id,
bool  $default 
)

Definition at line 104 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterExpanded().

104  : bool
105  {
106  $session = ilSession::get("ui");
107  if (isset($session["filter"][$filter_id][self::TYPE_EXPANDED])) {
108  return (bool) $session["filter"][$filter_id][self::TYPE_EXPANDED];
109  }
110 
111  return $default;
112  }
static get(string $a_var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRendered()

ilUIFilterServiceSessionGateway::isRendered ( string  $filter_id,
string  $input_id,
bool  $default 
)

Definition at line 60 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterInputRendered().

60  : bool
61  {
62  $session = ilSession::get("ui");
63  if (isset($session["filter"][$filter_id][self::TYPE_RENDERED][$input_id])) {
64  return (bool) $session["filter"][$filter_id][self::TYPE_RENDERED][$input_id];
65  }
66 
67  return $default;
68  }
static get(string $a_var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reset()

ilUIFilterServiceSessionGateway::reset ( string  $filter_id)

Resets filter to its default state.

Definition at line 73 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), null, and ilSession\set().

Referenced by UIFilterServiceSessionGatewayTest\testClear().

73  : void
74  {
75  $session = ilSession::get("ui");
76  $session["filter"][$filter_id] = null;
77  ilSession::set("ui", $session);
78  }
static get(string $a_var)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeActivated()

ilUIFilterServiceSessionGateway::writeActivated ( string  $filter_id,
bool  $value 
)

Definition at line 80 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), and ilSession\set().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterActivated().

80  : void
81  {
82  $session = ilSession::get("ui");
83  $session["filter"][$filter_id][self::TYPE_ACTIVATED] = $value;
84  ilSession::set("ui", $session);
85  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeExpanded()

ilUIFilterServiceSessionGateway::writeExpanded ( string  $filter_id,
bool  $value 
)

Definition at line 87 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), and ilSession\set().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterExpanded().

87  : void
88  {
89  $session = ilSession::get("ui");
90  $session["filter"][$filter_id][self::TYPE_EXPANDED] = $value;
91  ilSession::set("ui", $session);
92  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeRendered()

ilUIFilterServiceSessionGateway::writeRendered ( string  $filter_id,
string  $input_id,
bool  $value 
)

Definition at line 53 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), and ilSession\set().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterInputRendered().

53  : void
54  {
55  $session = ilSession::get("ui");
56  $session["filter"][$filter_id][self::TYPE_RENDERED][$input_id] = $value;
57  ilSession::set("ui", $session);
58  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeValue()

ilUIFilterServiceSessionGateway::writeValue ( string  $filter_id,
string  $input_id,
  $value 
)

Write session value for an input field.

Definition at line 35 of file class.ilUIFilterServiceSessionGateway.php.

References ilSession\get(), and ilSession\set().

Referenced by UIFilterServiceSessionGatewayTest\testClear(), and UIFilterServiceSessionGatewayTest\testFilterInputValue().

35  : void
36  {
37  $session = ilSession::get("ui");
38  $value = serialize($value);
39  $session["filter"][$filter_id][self::TYPE_VALUE][$input_id] = $value;
40  ilSession::set("ui", $session);
41  }
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ TYPE_ACTIVATED

const ilUIFilterServiceSessionGateway::TYPE_ACTIVATED = "activated"

Definition at line 29 of file class.ilUIFilterServiceSessionGateway.php.

◆ TYPE_EXPANDED

const ilUIFilterServiceSessionGateway::TYPE_EXPANDED = "expanded"

Definition at line 30 of file class.ilUIFilterServiceSessionGateway.php.

◆ TYPE_RENDERED

const ilUIFilterServiceSessionGateway::TYPE_RENDERED = "rendered"

Definition at line 28 of file class.ilUIFilterServiceSessionGateway.php.

◆ TYPE_VALUE

const ilUIFilterServiceSessionGateway::TYPE_VALUE = "value"

Definition at line 27 of file class.ilUIFilterServiceSessionGateway.php.


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