ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilContainerBlockPropertiesStorage Class Reference

Save container block property. More...

+ Collaboration diagram for ilContainerBlockPropertiesStorage:

Public Member Functions

 __construct ()
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 store ()
 Store property. More...
 

Static Public Member Functions

static storeProperty ($a_block_id, $a_user_id, $a_property, $a_value)
 Store property in session or db. More...
 
static getProperty ($a_block_id, $a_user_id, $a_property)
 Get property in session or db. More...
 

Protected Attributes

 $ctrl
 
 $user
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilContainerBlockPropertiesStorage::__construct ( )

Constructor.

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

References $DIC, and user().

28  {
29  global $DIC;
30 
31  $this->ctrl = $DIC->ctrl();
32  $this->user = $DIC->user();
33  }
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

& ilContainerBlockPropertiesStorage::executeCommand ( )

execute command

Definition at line 38 of file class.ilContainerBlockPropertiesStorage.php.

References $ctrl, $ilCtrl, and array.

39  {
41 
42  $cmd = $ilCtrl->getCmd();
43  if (in_array($cmd, array("store"))) {
44  $this->$cmd();
45  }
46  }
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ getProperty()

static ilContainerBlockPropertiesStorage::getProperty (   $a_block_id,
  $a_user_id,
  $a_property 
)
static

Get property in session or db.

Parameters
string$a_block_id
int$a_user_id
string$a_property
Returns
bool|string

Definition at line 90 of file class.ilContainerBlockPropertiesStorage.php.

References $_SESSION, and ilLoggerFactory\getLogger().

Referenced by ilContainerContentGUI\renderItemGroup().

91  {
92  $val = false;
93  if (isset($_SESSION["cont_block"][$a_block_id][$a_user_id][$a_property])) {
94  $val = $_SESSION["cont_block"][$a_block_id][$a_user_id][$a_property];
95  }
97  ->debug("block id: " . $a_block_id . ", user id: " . $a_user_id . ", property: " . $a_property . ", val: " . print_r($val, true));
98  return $val;
99  }
$_SESSION["AccountId"]
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ store()

ilContainerBlockPropertiesStorage::store ( )

Store property.

Definition at line 51 of file class.ilContainerBlockPropertiesStorage.php.

References $_GET, $ilUser, and $user.

52  {
54 
55  switch ($_GET["act"]) {
56 
57  case "expand":
58  self::storeProperty($_GET["cont_block_id"], (int) $ilUser->getId(), "opened", "1");
59  break;
60 
61  case "collapse":
62  self::storeProperty($_GET["cont_block_id"], (int) $ilUser->getId(), "opened", "0");
63  break;
64  }
65  }
$_GET["client_id"]
$ilUser
Definition: imgupload.php:18

◆ storeProperty()

static ilContainerBlockPropertiesStorage::storeProperty (   $a_block_id,
  $a_user_id,
  $a_property,
  $a_value 
)
static

Store property in session or db.

Parameters
string$a_block_id
int$a_user_id
string$a_property
string$a_value

Definition at line 75 of file class.ilContainerBlockPropertiesStorage.php.

References $_SESSION, and ilLoggerFactory\getLogger().

76  {
77  $_SESSION["cont_block"][$a_block_id][$a_user_id][$a_property] = $a_value;
79  ->debug("block id: " . $a_block_id . ", user id: " . $a_user_id . ", property: " . $a_property . ", val: " . print_r($a_value, true));
80  }
$_SESSION["AccountId"]
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilContainerBlockPropertiesStorage::$ctrl
protected

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

Referenced by executeCommand().

◆ $user

ilContainerBlockPropertiesStorage::$user
protected

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

Referenced by store().


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