30 $this->db = $DIC->database();
44 if ($a_context ==
"" || $a_name ==
"") {
51 "name" => array(
"text", $a_name),
52 "user_id" => array(
"integer", $a_user_id),
53 "context" => array(
"text", $a_context)),
55 "value" => array(
"text", serialize($a_state))
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"]);
87 public function delete(
94 if ($a_context ==
"" || $a_name ==
"") {
99 "DELETE FROM table_templates " .
100 " WHERE name = " .
$ilDB->quote($a_name,
"text") .
101 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
102 " AND context = " .
$ilDB->quote($a_context,
"text")
115 if ($a_context ==
"") {
120 "SELECT name FROM table_templates " .
121 " WHERE user_id = " .
$ilDB->quote($a_user_id,
"integer") .
122 " AND context = " .
$ilDB->quote($a_context,
"text") .
126 while ($rec =
$ilDB->fetchAssoc($set)) {
127 $result[] = $rec[
"name"];
store(string $a_context, int $a_user_id, string $a_name, array $a_state)
Store table template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNames(string $a_context, int $a_user_id)
List templates.
load(string $a_context, int $a_user_id, string $a_name)
Get table template.