27        $this->db = 
$DIC->database();
 
   38    public function store($a_context, $a_user_id, $a_name, array $a_state)
 
   42        if ($a_context == 
"" || $a_name == 
"") {
 
   49                "name" => array(
"text", $a_name),
 
   50                "user_id" => array(
"integer", $a_user_id),
 
   51                "context" => array(
"text", $a_context)),
 
   53                "value" => array(
"text", serialize($a_state))
 
   66    public function load($a_context, $a_user_id, $a_name)
 
   70        if ($a_context == 
"" || $a_name == 
"") {
 
   75            "SELECT value FROM table_templates " .
 
   76            " WHERE name = " . 
$ilDB->quote($a_name, 
"text") .
 
   77            " AND user_id = " . 
$ilDB->quote($a_user_id, 
"integer") .
 
   78            " AND context = " . 
$ilDB->quote($a_context, 
"text")
 
   80        $rec = 
$ilDB->fetchAssoc($set);
 
   81        return unserialize($rec[
"value"]);
 
   91    public function delete($a_context, $a_user_id, $a_name)
 
   95        if ($a_context == 
"" || $a_name == 
"") {
 
  100            "DELETE FROM table_templates " .
 
  101            " WHERE name = " . 
$ilDB->quote($a_name, 
"text") .
 
  102            " AND user_id = " . 
$ilDB->quote($a_user_id, 
"integer") .
 
  103            " AND context = " . 
$ilDB->quote($a_context, 
"text")
 
  118        if ($a_context == 
"") {
 
  123            "SELECT name FROM table_templates " .
 
  124            " WHERE user_id = " . 
$ilDB->quote($a_user_id, 
"integer") .
 
  125            " AND context = " . 
$ilDB->quote($a_context, 
"text") .
 
  129        while ($rec = 
$ilDB->fetchAssoc($set)) {
 
An exception for terminatinating execution or to throw for unit testing.
Saves (mostly asynchronously) user properties of tables (e.g.
load($a_context, $a_user_id, $a_name)
Get table template.
getNames($a_context, $a_user_id)
List templates.
__construct()
Constructor.
store($a_context, $a_user_id, $a_name, array $a_state)
Store table template.