3 declare(strict_types=1);
    48         bool $outdated = 
false    52         $db->
insert(
"style_char", [
    53             "style_id" => [
"integer", $style_id],
    54             "type" => [
"text", $type],
    55             "characteristic" => [
"text", $char],
    56             "hide" => [
"integer", $hidden],
    57             "order_nr" => [
"integer", $order_nr],
    58             "outdated" => [
"integer", $outdated]
    70             "SELECT * FROM style_char " .
    71             " WHERE style_id = %s AND type = %s AND characteristic = %s",
    72             [
"integer", 
"text", 
"text"],
    73             [$style_id, $type, $char]
    84         string $characteristic
    89             "SELECT * FROM style_char " .
    90             " WHERE style_id = %s AND type = %s AND characteristic = %s ",
    91             [
"integer", 
"text", 
"text"],
    92             [$style_id, $type, $characteristic]
    96                 "SELECT * FROM style_char_title " .
    97                 " WHERE style_id = %s AND type = %s AND characteristic = %s ",
    98                 [
"integer", 
"text", 
"text"],
    99                 [$style_id, $type, $characteristic]
   103                 $titles[$rec2[
"lang"]] = $rec2[
"title"];
   105             return $this->factory->characteristic(
   111                 (
int) $rec[
"order_nr"],
   112                 (
bool) $rec[
"outdated"]
   131         bool $include_hidden = 
true,
   132         bool $include_outdated = 
true   137             "SELECT * FROM style_char " .
   138             " WHERE style_id = %s AND " . $db->
in(
"type", $types, 
false, 
"text") .
   139             " ORDER BY order_nr, type, characteristic",
   145             if (($rec[
"hide"] && !$include_hidden) ||
   146                 ($rec[
"outdated"] && !$include_outdated)) {
   151                 "SELECT * FROM style_char_title " .
   152                 " WHERE style_id = %s AND type = %s AND characteristic = %s ",
   153                 [
"integer", 
"text", 
"text"],
   154                 [$style_id, $rec[
"type"], $rec[
"characteristic"]]
   158                 $titles[$rec2[
"lang"]] = $rec2[
"title"];
   160             $chars[] = $this->factory->characteristic(
   162                 $rec[
"characteristic"],
   166                 (
int) $rec[
"order_nr"],
   167                 (
bool) $rec[
"outdated"]
   182         $types = $stypes[$super_type];
   197         string $characteristic,
   203             "DELETE FROM style_char_title " .
   204             " WHERE style_id = %s AND type = %s AND characteristic = %s ",
   205             [
"integer", 
"text", 
"text"],
   206             [$style_id, $type, $characteristic]
   209         foreach ($titles as $l => $title) {
   223         string $characteristic,
   229         $db->
insert(
"style_char_title", [
   230             "style_id" => [
"integer", $style_id],
   231             "type" => [
"text", $type],
   232             "characteristic" => [
"text", $characteristic],
   233             "lang" => [
"text", $lang],
   234             "title" => [
"text", $title]
   243         $set = $this->db->queryF(
   244             "SELECT * FROM style_char " .
   245             " WHERE style_id = %s ",
   249         while ($rec = $this->db->fetchAssoc($set)) {
   250             $this->db->insert(
"style_char", [
   251                 "style_id" => [
"integer", $to_style_id],
   252                 "type" => [
"text", $rec[
"type"]],
   253                 "characteristic" => [
"text", $rec[
"characteristic"]],
   254                 "hide" => [
"integer", (
int) ($rec[
"hide"] ?? 0)],
   255                 "outdated" => [
"integer", (
int) ($rec[
"outdated"] ?? 0)],
   256                 "order_nr" => [
"integer", (
int) ($rec[
"order_nr"] ?? 0)]
   259         $set = $this->db->queryF(
   260             "SELECT * FROM style_char_title " .
   261             " WHERE style_id = %s ",
   265         while ($rec = $this->db->fetchAssoc($set)) {
   266             $this->db->insert(
"style_char_title", [
   267                 "style_id" => [
"integer", $to_style_id],
   268                 "type" => [
"text", $rec[
"type"]],
   269                 "characteristic" => [
"text", $rec[
"characteristic"]],
   270                 "lang" => [
"text", $rec[
"lang"]],
   271                 "title" => [
"text", $rec[
"title"]]
   282         string $characteristic,
   290             "hide" => [
"integer", $hide]
   293                 "style_id" => [
"integer", $style_id],
   294                 "type" => [
"text", $type],
   295                 "characteristic" => [
"text", $characteristic]
   306         string $characteristic,
   314             "outdated" => [
"integer", $outdated]
   317                 "style_id" => [
"integer", $style_id],
   318                 "type" => [
"text", $type],
   319                 "characteristic" => [
"text", $characteristic]
   327         string $characteristic
   332             "SELECT outdated FROM style_char " .
   333             " WHERE style_id = %s AND type = %s AND characteristic = %s",
   334             [
"integer", 
"text", 
"text"],
   335             [$style_id, $type, $characteristic]
   338             return (
bool) $rec[
"outdated"];
   346         string $characteristic,
   354             "order_nr" => [
"integer", $order_nr]
   357                 "style_id" => [
"integer", $style_id],
   358                 "type" => [
"text", $type],
   359                 "characteristic" => [
"text", $characteristic]
   374             "DELETE FROM style_char WHERE style_id = %s AND type = %s AND characteristic = %s",
   375             array(
"integer", 
"text", 
"text"),
   376             array($style_id, $type, $class)
   381             "DELETE FROM style_parameter WHERE style_id = %s AND tag = %s AND type = %s AND class = %s",
   382             array(
"integer", 
"text", 
"text", 
"text"),
   383             array($style_id, $tag, $type, $class)
   399         bool $a_custom = 
false   404             "SELECT * FROM style_parameter " .
   405             " WHERE style_id = %s AND tag = %s AND class = %s AND mq_id = %s " .
   406             " AND custom = %s AND type = %s AND parameter = %s ",
   407             [
"integer", 
"text", 
"text", 
"integer", 
"integer", 
"text", 
"text"],
   408             [$style_id, $a_tag, $a_class, $a_mq_id, $a_custom, $a_type, $a_par]
   411         if ($set->fetchRow()) {
   415                 "value" => [
"text", $a_val]
   418                     "style_id" => [
"integer", $style_id],
   419                     "tag" => [
"text", $a_tag],
   420                     "class" => [
"text", $a_class],
   421                     "mq_id" => [
"integer", $a_mq_id],
   422                     "custom" => [
"integer", $a_custom],
   423                     "type" => [
"text", $a_type],
   424                     "parameter" => [
"text", $a_par]
   429             $db->
insert(
"style_parameter", [
   430                 "id" => [
"integer", 
$id],
   431                 "value" => [
"text", $a_val],
   432                 "style_id" => [
"integer", $style_id],
   433                 "tag" => [
"text", $a_tag],
   434                 "class" => [
"text", $a_class],
   435                 "type" => [
"text", $a_type],
   436                 "parameter" => [
"text", $a_par],
   437                 "mq_id" => [
"integer", $a_mq_id],
   438                 "custom" => [
"integer", $a_custom]
   446         string $characteristic
   448         $set = $this->db->queryF(
   449             "SELECT * FROM style_parameter " .
   450             " WHERE style_id = %s AND class = %s AND type = %s",
   451             [
"integer", 
"string", 
"string"],
   452             [$style_id, $characteristic, $type]
   455         while ($rec = $this->db->fetchAssoc($set)) {
   472         $q = 
"DELETE FROM style_parameter WHERE " .
   473             " style_id = " . $db->
quote($style_id, 
"integer") . 
" AND " .
   474             " tag = " . $db->
quote($tag, 
"text") . 
" AND " .
   475             " class = " . $db->
quote($class, 
"text") . 
" AND " .
   476             " mq_id = " . $db->
quote($mq_id, 
"integer") . 
" AND " .
   477             " custom = " . $db->
quote($custom, 
"integer") . 
" AND " .
   478             " " . $db->
equals(
"type", $type, 
"text", 
true) . 
" AND " .
   479             " parameter = " . $db->
quote($par, 
"text");
   489         if ($old_name == $new_name) {
   495         $color_attributes = [
   500             "border-bottom-color",
   502             "border-right-color",
   506             "SELECT * FROM style_parameter " .
   507             " WHERE style_id = %s AND " . $db->
in(
"parameter", $color_attributes, 
false, 
"text"),
   512             if ($rec[
"value"] == 
"!" . $old_name ||
   513                 is_int(strpos($rec[
"value"], 
"!" . $old_name . 
"("))) {
   520                     str_replace($old_name, $new_name, $rec[
"value"]),
 
addCharacteristic(int $style_id, string $type, string $char, bool $hidden=false, int $order_nr=0, bool $outdated=false)
 
saveOrderNr(int $style_id, string $type, string $characteristic, int $order_nr)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
insert(string $table_name, array $values)
 
manipulateF(string $query, array $types, array $values)
 
__construct(ilDBInterface $db, InternalDataService $factory)
 
replaceParameter(int $style_id, string $a_tag, string $a_class, string $a_par, string $a_val, string $a_type, int $a_mq_id=0, bool $a_custom=false)
 
equals(string $columns, $value, string $type, bool $emptyOrNull=false)
 
fetchAssoc(ilDBStatement $statement)
 
getByKey(int $style_id, string $type, string $characteristic)
 
saveOutdated(int $style_id, string $type, string $characteristic, bool $outdated)
Save characteristic outdated status. 
 
update(string $table_name, array $values, array $where)
$where MUST contain existing columns only. 
 
addTitle(int $style_id, string $type, string $characteristic, string $lang, string $title)
 
quote($value, string $type)
 
static _getStyleSuperTypes()
 
exists(int $style_id, string $type, string $char)
 
deleteParameter(int $style_id, string $tag, string $class, string $par, string $type, int $mq_id=0, bool $custom=false)
 
getByTypes(int $style_id, array $types, bool $include_hidden=true, bool $include_outdated=true)
 
saveTitles(int $style_id, string $type, string $characteristic, array $titles)
Save titles for characteristic. 
 
saveHidden(int $style_id, string $type, string $characteristic, bool $hide)
Save characteristic hidden status. 
 
nextId(string $table_name)
 
getAllParametersOfCharacteristic(int $style_id, string $type, string $characteristic)
 
InternalDataService $factory
 
cloneAllFromStyle(int $from_style_id, int $to_style_id)
 
queryF(string $query, array $types, array $values)
 
Repository internal data service. 
 
Characteristic (Class) of style. 
 
getByType(int $style_id, string $type)
 
in(string $field, array $values, bool $negate=false, string $type="")
 
isOutdated(int $style_id, string $type, string $characteristic)
 
getBySuperType(int $style_id, string $super_type)
Get characteristics by supertype. 
 
deleteCharacteristic(int $style_id, string $type, string $tag, string $class)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
manipulate(string $query)
Run a (write) Query on the database. 
 
updateColorName(int $style_id, string $old_name, string $new_name)