ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAccordionPropertiesStorage Class Reference

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

+ Collaboration diagram for ilAccordionPropertiesStorage:

Public Member Functions

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

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

& ilAccordionPropertiesStorage::executeCommand ( )

execute command

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

References $cmd, $ilCtrl, and $ilUser.

{
global $ilUser, $ilCtrl;
$cmd = $ilCtrl->getCmd();
// $next_class = $this->ctrl->getNextClass($this);
$this->$cmd();
}
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.

{
global $ilDB;
switch ($this->properties[$a_property]["storage"])
{
case "session":
return $_SESSION["accordion"][$a_table_id][$a_user_id][$a_property];
break;
case "db":
/*
$set = $ilDB->query("SELECT value FROM table_properties ".
" WHERE table_id = ".$ilDB->quote($a_table_id, "text").
" AND user_id = ".$ilDB->quote($a_user_id, "integer").
" AND property = ".$ilDB->quote($a_property, "text")
);
$rec = $ilDB->fetchAssoc($set);
return $rec["value"];
break;
*/
}
}
ilAccordionPropertiesStorage::setOpenedTab ( )

Show Filter.

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

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

{
global $ilUser;
if ($_GET["user_id"] == $ilUser->getId())
{
$this->storeProperty($_GET["accordion_id"], $_GET["user_id"],
"opened", $_GET["tab_nr"]);
}
}

+ Here is the call graph for this function:

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().

{
global $ilDB;
switch ($this->properties[$a_property]["storage"])
{
case "session":
$_SESSION["accordion"][$a_table_id][$a_user_id][$a_property]
= $a_value;
break;
case "db":
/*
$ilDB->replace("table_properties", array(
"table_id" => array("text", $a_table_id),
"user_id" => array("integer", $a_user_id),
"property" => array("text", $a_property)),
array(
"value" => array("text", $a_value)
));
*/
}
}

+ Here is the caller graph for this function:

Field Documentation

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: