ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 26 of file class.ilUIFilterServiceSessionGateway.php.

Member Function Documentation

◆ getValue()

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

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

References $session, and ilSession\get().

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

45  {
46  $session = ilSession::get("ui");
47  if (isset($session["filter"][$filter_id][self::TYPE_VALUE][$input_id])) {
48  return unserialize($session["filter"][$filter_id][self::TYPE_VALUE][$input_id]);
49  }
50 
51  return null;
52  }
static get(string $a_var)
$session
+ 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 95 of file class.ilUIFilterServiceSessionGateway.php.

References $session, and ilSession\get().

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

95  : bool
96  {
97  $session = ilSession::get("ui");
98  if (isset($session["filter"][$filter_id][self::TYPE_ACTIVATED])) {
99  return (bool) $session["filter"][$filter_id][self::TYPE_ACTIVATED];
100  }
101 
102  return $default;
103  }
static get(string $a_var)
$session
+ 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 105 of file class.ilUIFilterServiceSessionGateway.php.

References $session, and ilSession\get().

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

105  : bool
106  {
107  $session = ilSession::get("ui");
108  if (isset($session["filter"][$filter_id][self::TYPE_EXPANDED])) {
109  return (bool) $session["filter"][$filter_id][self::TYPE_EXPANDED];
110  }
111 
112  return $default;
113  }
static get(string $a_var)
$session
+ 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 61 of file class.ilUIFilterServiceSessionGateway.php.

References $session, and ilSession\get().

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

61  : bool
62  {
63  $session = ilSession::get("ui");
64  if (isset($session["filter"][$filter_id][self::TYPE_RENDERED][$input_id])) {
65  return (bool) $session["filter"][$filter_id][self::TYPE_RENDERED][$input_id];
66  }
67 
68  return $default;
69  }
static get(string $a_var)
$session
+ 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 74 of file class.ilUIFilterServiceSessionGateway.php.

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

Referenced by UIFilterServiceSessionGatewayTest\testClear().

74  : void
75  {
76  $session = ilSession::get("ui");
77  $session["filter"][$filter_id] = null;
78  ilSession::set("ui", $session);
79  }
static get(string $a_var)
$session
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 81 of file class.ilUIFilterServiceSessionGateway.php.

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

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

81  : void
82  {
83  $session = ilSession::get("ui");
84  $session["filter"][$filter_id][self::TYPE_ACTIVATED] = $value;
85  ilSession::set("ui", $session);
86  }
static get(string $a_var)
$session
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 88 of file class.ilUIFilterServiceSessionGateway.php.

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

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

88  : void
89  {
90  $session = ilSession::get("ui");
91  $session["filter"][$filter_id][self::TYPE_EXPANDED] = $value;
92  ilSession::set("ui", $session);
93  }
static get(string $a_var)
$session
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 54 of file class.ilUIFilterServiceSessionGateway.php.

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

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

54  : void
55  {
56  $session = ilSession::get("ui");
57  $session["filter"][$filter_id][self::TYPE_RENDERED][$input_id] = $value;
58  ilSession::set("ui", $session);
59  }
static get(string $a_var)
$session
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 36 of file class.ilUIFilterServiceSessionGateway.php.

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

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

36  : void
37  {
38  $session = ilSession::get("ui");
39  $value = serialize($value);
40  $session["filter"][$filter_id][self::TYPE_VALUE][$input_id] = $value;
41  ilSession::set("ui", $session);
42  }
static get(string $a_var)
$session
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 30 of file class.ilUIFilterServiceSessionGateway.php.

◆ TYPE_EXPANDED

const ilUIFilterServiceSessionGateway::TYPE_EXPANDED = "expanded"

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

◆ TYPE_RENDERED

const ilUIFilterServiceSessionGateway::TYPE_RENDERED = "rendered"

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

◆ TYPE_VALUE

const ilUIFilterServiceSessionGateway::TYPE_VALUE = "value"

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


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