This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
static | copyStyleClass (string $orig_class, string $class, string $type, string $tag, int $hide=0) |
| Create style class GlossaryLink, link, IntLink. More...
|
|
static | addStyleClass (string $class, string $type, string $tag, array $parameters=[], int $hide=0) |
| Add style class. More...
|
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Update class for step 3136
- Author
- alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 28 of file class.ilDBUpdate3136.php.
◆ addStyleClass()
static ilDBUpdate3136::addStyleClass |
( |
string |
$class, |
|
|
string |
$type, |
|
|
string |
$tag, |
|
|
array |
$parameters = [] , |
|
|
int |
$hide = 0 |
|
) |
| |
|
static |
Add style class.
- Deprecated:
- use Services/Style/classes/Setup/class.ilStyleClassAddedObjective.php instead
Definition at line 104 of file class.ilDBUpdate3136.php.
References $ilDB, $res, and $type.
115 "SELECT obj_id" . PHP_EOL
116 .
"FROM object_data" . PHP_EOL
117 .
"WHERE type = 'sty'" . PHP_EOL
119 $result = $db->query($sql);
121 while ($row = $db->fetchAssoc($result)) {
123 "SELECT style_id, type, characteristic, hide" . PHP_EOL
124 .
"FROM style_char" . PHP_EOL
125 .
"WHERE style_id = " . $db->quote($row[
"obj_id"],
"integer") . PHP_EOL
126 .
"AND characteristic = " . $db->quote($class,
"text") . PHP_EOL
127 .
"AND type = " . $db->quote(
$type,
"text") . PHP_EOL;
128 $res = $db->query($sql);
130 if (!$db->fetchAssoc(
$res)) {
132 "style_id" => [
"integer", $row[
"obj_id"]],
133 "type" => [
"text",
$type],
134 "characteristic" => [
"text", $class],
135 "hide" => [
"integer", $hide]
137 $db->insert(
"style_char", $values);
139 foreach ($parameters as $k => $v) {
140 $spid = $db->nextId(
"style_parameter");
142 "id" => [
"integer", $spid],
143 "style_id" => [
"integer", $row[
"obj_id"]],
144 "tag" => [
"text", $tag],
145 "class" => [
"text", $class],
146 "parameter" => [
"text", $k],
147 "value" => [
"text", $v],
148 "type" => [
"text",
$type]
150 $db->insert(
"style_parameter", $values);
◆ copyStyleClass()
static ilDBUpdate3136::copyStyleClass |
( |
string |
$orig_class, |
|
|
string |
$class, |
|
|
string |
$type, |
|
|
string |
$tag, |
|
|
int |
$hide = 0 |
|
) |
| |
|
static |
Create style class GlossaryLink, link, IntLink.
- Deprecated:
- use Services/Style/classes/Setup/class.ilStyleClassCopiedObjective.php instead
Definition at line 35 of file class.ilDBUpdate3136.php.
References $ilDB, $res, and $type.
46 "SELECT obj_id" . PHP_EOL
47 .
"FROM object_data" . PHP_EOL
48 .
"WHERE type = 'sty'" . PHP_EOL
50 $set = $db->query($sql);
52 while ($row = $db->fetchAssoc($set)) {
54 "SELECT style_id, type, characteristic, hide" . PHP_EOL
55 .
"FROM style_char" . PHP_EOL
56 .
"WHERE style_id = " . $db->quote($row[
"obj_id"],
"integer") . PHP_EOL
57 .
"AND characteristic = " . $db->quote($class,
"text") . PHP_EOL
58 .
"AND type = " . $db->quote(
$type,
"text") . PHP_EOL
60 $res = $db->query($sql);
62 if (!$db->fetchAssoc(
$res)) {
64 "style_id" => [
"integer", $row[
"obj_id"]],
65 "type" => [
"text",
$type],
66 "characteristic" => [
"text", $class],
67 "hide" => [
"integer", $hide]
69 $db->insert(
"style_char", $values);
72 "SELECT id, style_id, tag, class, parameter, value, type, mq_id, custom" . PHP_EOL
73 .
"FROM style_parameter" . PHP_EOL
74 .
"WHERE style_id = " . $db->quote($row[
"obj_id"],
"integer") . PHP_EOL
75 .
"AND type = " . $db->quote(
$type,
"text") . PHP_EOL
76 .
"AND class = " . $db->quote($orig_class,
"text") . PHP_EOL
77 .
"AND tag = " . $db->quote($tag,
"text") . PHP_EOL
80 $res = $db->query($sql);
82 while ($row_2 = $db->fetchAssoc(
$res)) {
83 $spid = $db->nextId(
"style_parameter");
85 "id" => [
"integer", $spid],
86 "style_id" => [
"integer", $row[
"obj_id"]],
87 "tag" => [
"text", $tag],
88 "class" => [
"text", $class],
89 "parameter" => [
"text", $row_2[
"parameter"]],
90 "value" => [
"text", $row_2[
"value"]],
91 "type" => [
"text", $row_2[
"type"]]
93 $db->insert(
"style_parameter", $values);
The documentation for this class was generated from the following file: