ILIAS  release_8 Revision v8.24
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.

45 {
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

References $session, and ilSession\get().

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

+ 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.

95 : bool
96 {
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 }

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

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

+ 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.

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 }

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

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

+ 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.

61 : bool
62 {
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 }

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

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

+ 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.

74 : void
75 {
77 $session["filter"][$filter_id] = null;
79 }
static set(string $a_var, $a_val)
Set a value.

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

Referenced by UIFilterServiceSessionGatewayTest\testClear().

+ 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.

81 : void
82 {
84 $session["filter"][$filter_id][self::TYPE_ACTIVATED] = $value;
86 }

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

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

+ 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.

88 : void
89 {
91 $session["filter"][$filter_id][self::TYPE_EXPANDED] = $value;
93 }

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

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

+ 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.

54 : void
55 {
57 $session["filter"][$filter_id][self::TYPE_RENDERED][$input_id] = $value;
59 }

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

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

+ 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.

36 : void
37 {
39 $value = serialize($value);
40 $session["filter"][$filter_id][self::TYPE_VALUE][$input_id] = $value;
42 }

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

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

+ 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.

Referenced by isActivated(), and writeActivated().

◆ TYPE_EXPANDED

const ilUIFilterServiceSessionGateway::TYPE_EXPANDED = "expanded"

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

Referenced by isExpanded(), and writeExpanded().

◆ TYPE_RENDERED

const ilUIFilterServiceSessionGateway::TYPE_RENDERED = "rendered"

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

Referenced by isRendered(), and writeRendered().

◆ TYPE_VALUE

const ilUIFilterServiceSessionGateway::TYPE_VALUE = "value"

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

Referenced by writeValue().


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