26        $this->db = 
$DIC->database();
 
   42        $set = 
$ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
 
   43        while ($rec = 
$ilDB->fetchAssoc($set)) {        
 
   44            $set2 = 
$ilDB->query(
"SELECT * FROM style_char WHERE " .
 
   45                "style_id = " . 
$ilDB->quote($rec[
"obj_id"], 
"integer") . 
" AND " .
 
   46                "characteristic = " . 
$ilDB->quote($a_class, 
"text") . 
" AND " .
 
   48            if (!
$ilDB->fetchAssoc($set2)) {
 
   49                $q = 
"INSERT INTO style_char (style_id, type, characteristic, hide)" .
 
   51                    $ilDB->quote($rec[
"obj_id"], 
"integer") . 
"," .
 
   53                    $ilDB->quote($a_class, 
"text") . 
"," .
 
   54                    $ilDB->quote($a_hide, 
"integer") . 
")";
 
   55                $ilDB->manipulate($q);
 
   58                    "SELECT * FROM style_parameter WHERE " .
 
   59                    "style_id = " . 
$ilDB->quote($rec[
"obj_id"], 
"integer") . 
" AND " .
 
   61                    "class = " . 
$ilDB->quote($a_orig_class, 
"text") . 
" AND " .
 
   62                    "tag = " . 
$ilDB->quote($a_tag, 
"text")
 
   64                while ($rec3 = 
$ilDB->fetchAssoc($set3)) {      
 
   65                    $spid = 
$ilDB->nextId(
"style_parameter");
 
   66                    $q = 
"INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)" .
 
   68                        $ilDB->quote($spid, 
"integer") . 
"," .
 
   69                        $ilDB->quote($rec[
"obj_id"], 
"integer") . 
"," .
 
   70                        $ilDB->quote($rec3[
"type"], 
"text") . 
"," .
 
   71                        $ilDB->quote($a_class, 
"text") . 
"," .
 
   72                        $ilDB->quote($a_tag, 
"text") . 
"," .
 
   73                        $ilDB->quote($rec3[
"parameter"], 
"text") . 
"," .
 
   74                        $ilDB->quote($rec3[
"value"], 
"text") .
 
   76                    $ilDB->manipulate($q);
 
   92        if ($a_parameters == 
"") {
 
   93            $a_parameters = array();
 
   96        $set = 
$ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
 
   97        while ($rec = 
$ilDB->fetchAssoc($set)) {        
 
   98            $set2 = 
$ilDB->query(
"SELECT * FROM style_char WHERE " .
 
   99                "style_id = " . 
$ilDB->quote($rec[
"obj_id"], 
"integer") . 
" AND " .
 
  100                "characteristic = " . 
$ilDB->quote($a_class, 
"text") . 
" AND " .
 
  102            if (!
$ilDB->fetchAssoc($set2)) {
 
  103                $q = 
"INSERT INTO style_char (style_id, type, characteristic, hide)" .
 
  105                    $ilDB->quote($rec[
"obj_id"], 
"integer") . 
"," .
 
  107                    $ilDB->quote($a_class, 
"text") . 
"," .
 
  108                    $ilDB->quote($a_hide, 
"integer") . 
")";
 
  110                $ilDB->manipulate($q);
 
  111                foreach ($a_parameters as $k => $v) {
 
  112                    $spid = 
$ilDB->nextId(
"style_parameter");
 
  113                    $q = 
"INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)" .
 
  115                        $ilDB->quote($spid, 
"integer") . 
"," .
 
  116                        $ilDB->quote($rec[
"obj_id"], 
"integer") . 
"," .
 
  118                        $ilDB->quote($a_class, 
"text") . 
"," .
 
  119                        $ilDB->quote($a_tag, 
"text") . 
"," .
 
  120                        $ilDB->quote($k, 
"text") . 
"," .
 
  121                        $ilDB->quote($v, 
"text") .
 
  124                    $ilDB->manipulate($q);
 
An exception for terminatinating execution or to throw for unit testing.
DB Migration helper class.
__construct()
Constructor.
addStyleClass($a_class, $a_type, $a_tag, $a_parameters="", $a_hide=0)
Add style class.
static copyStyleClass($a_orig_class, $a_class, $a_type, $a_tag, $a_hide=0)
Create style class GlossaryLink, link, IntLink.