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

Save container block property.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

@ilCtrl_Calls ilContainerBlockPropertiesStorage:

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

Constructor & Destructor Documentation

◆ __construct()

ilContainerBlockPropertiesStorage::__construct ( )

Constructor.

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

28 {
29 global $DIC;
30
31 $this->ctrl = $DIC->ctrl();
32 $this->user = $DIC->user();
33 }
user()
Definition: user.php:4
global $DIC
Definition: saml.php:7

References $DIC, and user().

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

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

References $ctrl, and $ilCtrl.

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

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.

References $_SESSION, and ilLoggerFactory\getLogger().

Referenced by ilContainerContentGUI\renderItemGroup().

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

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"]
static storeProperty($a_block_id, $a_user_id, $a_property, $a_value)
Store property in session or db.
$ilUser
Definition: imgupload.php:18

References $_GET, $ilUser, $user, and storeProperty().

+ Here is the call graph for this function:

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

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 }

References $_SESSION, and ilLoggerFactory\getLogger().

Referenced by store().

+ Here is the call graph for this function:
+ Here is the caller 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: