33 $this->db = $DIC->database();
47 if ($a_context ==
"" || $a_name ==
"") {
54 "name" => array(
"text", $a_name),
55 "user_id" => array(
"integer", $a_user_id),
56 "context" => array(
"text", $a_context)),
58 "value" => array(
"text", serialize($a_state))
73 if ($a_context ==
"" || $a_name ==
"") {
78 "SELECT value FROM table_templates " .
79 " WHERE name = " .
$ilDB->quote($a_name,
"text") .
80 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
81 " AND context = " .
$ilDB->quote($a_context,
"text")
83 $rec =
$ilDB->fetchAssoc($set);
84 return unserialize((
string) $rec[
"value"]);
90 public function delete(
97 if ($a_context ==
"" || $a_name ==
"") {
102 "DELETE FROM table_templates " .
103 " WHERE name = " .
$ilDB->quote($a_name,
"text") .
104 " AND user_id = " .
$ilDB->quote($a_user_id,
"integer") .
105 " 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)) {
130 $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.