ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUIFilterServiceSessionGateway Class Reference

Session data handling for filter ui service. More...

+ Collaboration diagram for ilUIFilterServiceSessionGateway:

Public Member Functions

 __construct ()
 Constructor. More...
 
 writeValue (string $filter_id, string $input_id, $value)
 Write session value for an input field. More...
 
 getValue (string $filter_id, string $input_id)
 Get value. More...
 
 writeRendered (string $filter_id, string $input_id, bool $value)
 Write rendered information. More...
 
 isRendered (string $filter_id, string $input_id, bool $default)
 Is rendered status active? More...
 
 reset (string $filter_id)
 Resets filter to its default state. More...
 
 writeActivated (string $filter_id, bool $value)
 Write activation info of filter. More...
 
 writeExpanded (string $filter_id, bool $value)
 Write expand info of filter. More...
 
 isActivated (string $filter_id, bool $default)
 Is activated? More...
 
 isExpanded (string $filter_id, bool $default)
 Is expanded? More...
 

Data Fields

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

Detailed Description

Session data handling for filter ui service.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilUIFilterServiceSessionGateway::__construct ( )

Constructor.

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

22  {
23  }

Member Function Documentation

◆ getValue()

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

Get value.

Parameters
string$filter_id
string$input_id
Returns
mixed|null

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

References $_SESSION.

46  {
47  if (isset($_SESSION["ui"]["filter"][$filter_id][self::TYPE_VALUE][$input_id])) {
48  return unserialize($_SESSION["ui"]["filter"][$filter_id][self::TYPE_VALUE][$input_id]);
49  }
50  return null;
51  }
$_SESSION["AccountId"]

◆ isActivated()

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

Is activated?

Parameters
string$filter_id
bool$default
Returns
bool

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

References $_SESSION.

122  : bool
123  {
124  if (isset($_SESSION["ui"]["filter"][$filter_id][self::TYPE_ACTIVATED])) {
125  return (bool) $_SESSION["ui"]["filter"][$filter_id][self::TYPE_ACTIVATED];
126  }
127  return $default;
128  }
$_SESSION["AccountId"]

◆ isExpanded()

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

Is expanded?

Parameters
string$filter_id
bool$default
Returns
bool

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

References $_SESSION.

137  : bool
138  {
139  if (isset($_SESSION["ui"]["filter"][$filter_id][self::TYPE_EXPANDED])) {
140  return (bool) $_SESSION["ui"]["filter"][$filter_id][self::TYPE_EXPANDED];
141  }
142  return $default;
143  }
$_SESSION["AccountId"]

◆ isRendered()

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

Is rendered status active?

Parameters
string$filter_id
string$input_id
bool$default
Returns
bool

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

References $_SESSION.

74  : bool
75  {
76  if (isset($_SESSION["ui"]["filter"][$filter_id][self::TYPE_RENDERED][$input_id])) {
77  return $_SESSION["ui"]["filter"][$filter_id][self::TYPE_RENDERED][$input_id];
78  }
79  return $default;
80  }
$_SESSION["AccountId"]

◆ reset()

ilUIFilterServiceSessionGateway::reset ( string  $filter_id)

Resets filter to its default state.

Parameters
string$filter_id

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

References $_SESSION.

88  {
89  unset($_SESSION["ui"]["filter"][$filter_id]);
90  }
$_SESSION["AccountId"]

◆ writeActivated()

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

Write activation info of filter.

Parameters
string$filter_id
bool$value

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

References $_SESSION.

100  {
101  $_SESSION["ui"]["filter"][$filter_id][self::TYPE_ACTIVATED] = $value;
102  }
$_SESSION["AccountId"]

◆ writeExpanded()

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

Write expand info of filter.

Parameters
string$filter_id
bool$value

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

References $_SESSION.

111  {
112  $_SESSION["ui"]["filter"][$filter_id][self::TYPE_EXPANDED] = $value;
113  }
$_SESSION["AccountId"]

◆ writeRendered()

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

Write rendered information.

Parameters
string$filter_id
string$input_id
$value

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

References $_SESSION.

62  {
63  $_SESSION["ui"]["filter"][$filter_id][self::TYPE_RENDERED][$input_id] = $value;
64  }
$_SESSION["AccountId"]

◆ writeValue()

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

Write session value for an input field.

Parameters
string$filter_id
string$input_id
$value

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

References $_SESSION.

33  {
34  $value = serialize($value);
35  $_SESSION["ui"]["filter"][$filter_id][self::TYPE_VALUE][$input_id] = $value;
36  }
$_SESSION["AccountId"]

Field Documentation

◆ TYPE_ACTIVATED

const ilUIFilterServiceSessionGateway::TYPE_ACTIVATED = "activated"

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

◆ TYPE_EXPANDED

const ilUIFilterServiceSessionGateway::TYPE_EXPANDED = "expanded"

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

◆ TYPE_RENDERED

const ilUIFilterServiceSessionGateway::TYPE_RENDERED = "rendered"

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

◆ TYPE_VALUE

const ilUIFilterServiceSessionGateway::TYPE_VALUE = "value"

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


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