ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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)

References 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 94 of file class.ilUIFilterServiceSessionGateway.php.

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 }

References 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 104 of file class.ilUIFilterServiceSessionGateway.php.

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 }

References 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 60 of file class.ilUIFilterServiceSessionGateway.php.

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 }

References 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 73 of file class.ilUIFilterServiceSessionGateway.php.

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

References 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 80 of file class.ilUIFilterServiceSessionGateway.php.

80 : void
81 {
82 $session = ilSession::get("ui");
83 $session["filter"][$filter_id][self::TYPE_ACTIVATED] = $value;
84 ilSession::set("ui", $session);
85 }

References 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 87 of file class.ilUIFilterServiceSessionGateway.php.

87 : void
88 {
89 $session = ilSession::get("ui");
90 $session["filter"][$filter_id][self::TYPE_EXPANDED] = $value;
91 ilSession::set("ui", $session);
92 }

References 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 53 of file class.ilUIFilterServiceSessionGateway.php.

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 }

References 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 35 of file class.ilUIFilterServiceSessionGateway.php.

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 }

References 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 29 of file class.ilUIFilterServiceSessionGateway.php.

Referenced by isActivated(), and writeActivated().

◆ TYPE_EXPANDED

const ilUIFilterServiceSessionGateway::TYPE_EXPANDED = "expanded"

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

Referenced by isExpanded(), and writeExpanded().

◆ TYPE_RENDERED

const ilUIFilterServiceSessionGateway::TYPE_RENDERED = "rendered"

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

Referenced by isRendered(), and writeRendered().

◆ TYPE_VALUE

const ilUIFilterServiceSessionGateway::TYPE_VALUE = "value"

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

Referenced by writeValue().


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