ILIAS  release_4-4 Revision
ilAccordionPropertiesStorage Class Reference

Saves (mostly asynchronously) user properties of accordions. More...

+ Collaboration diagram for ilAccordionPropertiesStorage:

Public Member Functions

executeCommand ()
 execute command More...
 
 setOpenedTab ()
 Show Filter. More...
 
 storeProperty ($a_table_id, $a_user_id, $a_property, $a_value)
 Store property in session or db. More...
 
 getProperty ($a_table_id, $a_user_id, $a_property)
 Get property in session or db. More...
 

Data Fields

 $properties
 

Detailed Description

Saves (mostly asynchronously) user properties of accordions.

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

ilAccordionPropertiesStorage:

Definition at line 12 of file class.ilAccordionPropertiesStorage.php.

Member Function Documentation

◆ executeCommand()

& ilAccordionPropertiesStorage::executeCommand ( )

execute command

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

References $cmd, $ilCtrl, and $ilUser.

22  {
23  global $ilUser, $ilCtrl;
24 
25  $cmd = $ilCtrl->getCmd();
26 // $next_class = $this->ctrl->getNextClass($this);
27 
28  $this->$cmd();
29  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

◆ getProperty()

ilAccordionPropertiesStorage::getProperty (   $a_table_id,
  $a_user_id,
  $a_property 
)

Get property in session or db.

Definition at line 76 of file class.ilAccordionPropertiesStorage.php.

References $_SESSION.

77  {
78  global $ilDB;
79 
80  switch ($this->properties[$a_property]["storage"])
81  {
82  case "session":
83  return $_SESSION["accordion"][$a_table_id][$a_user_id][$a_property];
84  break;
85 
86  case "db":
87 /*
88  $set = $ilDB->query("SELECT value FROM table_properties ".
89  " WHERE table_id = ".$ilDB->quote($a_table_id, "text").
90  " AND user_id = ".$ilDB->quote($a_user_id, "integer").
91  " AND property = ".$ilDB->quote($a_property, "text")
92  );
93  $rec = $ilDB->fetchAssoc($set);
94  return $rec["value"];
95  break;
96 */
97  }
98  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ setOpenedTab()

ilAccordionPropertiesStorage::setOpenedTab ( )

Show Filter.

Definition at line 34 of file class.ilAccordionPropertiesStorage.php.

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

35  {
36  global $ilUser;
37 
38  if ($_GET["user_id"] == $ilUser->getId())
39  {
40  $this->storeProperty($_GET["accordion_id"], $_GET["user_id"],
41  "opened", $_GET["tab_nr"]);
42  }
43  }
$_GET["client_id"]
storeProperty($a_table_id, $a_user_id, $a_property, $a_value)
Store property in session or db.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ storeProperty()

ilAccordionPropertiesStorage::storeProperty (   $a_table_id,
  $a_user_id,
  $a_property,
  $a_value 
)

Store property in session or db.

Definition at line 48 of file class.ilAccordionPropertiesStorage.php.

References $_SESSION.

Referenced by setOpenedTab().

50  {
51  global $ilDB;
52 
53  switch ($this->properties[$a_property]["storage"])
54  {
55  case "session":
56  $_SESSION["accordion"][$a_table_id][$a_user_id][$a_property]
57  = $a_value;
58  break;
59 
60  case "db":
61 /*
62  $ilDB->replace("table_properties", array(
63  "table_id" => array("text", $a_table_id),
64  "user_id" => array("integer", $a_user_id),
65  "property" => array("text", $a_property)),
66  array(
67  "value" => array("text", $a_value)
68  ));
69 */
70  }
71  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

Field Documentation

◆ $properties

ilAccordionPropertiesStorage::$properties
Initial value:
= array (
"opened" => array("storage" => "session")
)

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


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