ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilStyleDataSet Class Reference

Style Data set class. More...

+ Inheritance diagram for ilStyleDataSet:
+ Collaboration diagram for ilStyleDataSet:

Public Member Functions

 __construct ()
 
 getSupportedVersions ()
 Get supported versions. More...
 
 getXmlNamespace (string $a_entity, string $a_schema_version)
 Get xml namespace. More...
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 Get xml record. More...
 
 readData (string $a_entity, string $a_version, array $a_ids)
 Read data. More...
 
 getContainerExportConfig (array $record, string $entity, string $schema_version, string $field, string $value)
 
 importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 Import record. More...
 
- Public Member Functions inherited from ilDataSet
 __construct ()
 
 init (string $a_entity, string $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 
 readData (string $a_entity, string $a_version, array $a_ids)
 Read data from DB. More...
 
 initByExporter (ilXmlExporter $xml_exporter)
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setDSPrefix (string $a_val)
 
 getDSPrefix ()
 
 getDSPrefixString ()
 
 getDirectDataFromQuery (string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper (string $a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, ?array $a_ids, string $a_field="", bool $a_omit_header=false, bool $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text" > <ftype name="field_2" type="date" > <ftype name="field_3" type="integer" > </types> <types ...> ... </types> <set entity="table_name"> <rec> <field_1>content</field_1> <field_2>my_date</field_2> <field_3>my_number</field_3> </rec> ... </set> </dataset> More...
 
 addRecordsXml (ilXmlWriter $a_writer, array $a_prefixes, string $a_entity, string $a_schema_version, array $a_ids, ?string $a_field="")
 
 afterXmlRecordWriting (string $a_entity, string $a_version, array $a_set)
 
 getNamespaces (array &$namespaces, string $a_entity, string $a_schema_version)
 
 getXmlRecord (string $a_entity, string $a_version, array $a_set)
 Get xml record for version. More...
 
 getXmlTypes (string $a_entity, string $a_version)
 Get xml types. More...
 
 getXMLEntityName (string $a_entity, string $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag (string $a_entity, string $a_schema_version)
 Get entity tag. More...
 
 setImport (ilSurveyImporter $a_val)
 
 getImport ()
 
 setCurrentInstallationId (string $a_val)
 
 getCurrentInstallationId ()
 
 importRecord (string $a_entity, array $a_types, array $a_rec, ilImportMapping $a_mapping, string $a_schema_version)
 Needs to be overwritten for import use case. More...
 
 getCollection (array $record, string $entity, string $schema_version, string $field, string $value)
 
 getContainerExportConfig (array $record, string $entity, string $schema_version, string $field, string $value)
 

Protected Member Functions

 getTypes (string $a_entity, string $a_version)
 Get field types for entity. More...
 
 getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 Determine the dependent sets of data. More...
 
- Protected Member Functions inherited from ilDataSet
 getTypes (string $a_entity, string $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace (string $a_entity, string $a_schema_version)
 
 getExportDirInContainer (string $exp_dir)
 
 getIRSSContainerExportConfig (StorableResource $source_container, string $source_path, string $target_path="")
 
 getDependencies (string $a_entity, string $a_version, ?array $a_rec=null, ?array $a_ids=null)
 
 createObjectExportId (string $a_type, string $a_id)
 Build ilias export id. More...
 
 parseObjectExportId (string $a_id, ?string $a_fallback_id=null)
 Parse export id. More...
 
 stripTags (array $rec, array $omit_keys=[])
 

Protected Attributes

Content DomainService $content_style_domain
 
Content InternalDomainService $style_domain
 
ilObjStyleSheet $current_obj = null
 
Content InternalRepoService $repo
 
ilLogger $log
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
array $styles_with_explicit_owner = []
 
- Protected Attributes inherited from ilDataSet
ILIAS ResourceStorage Services $irss
 
string $current_installation_id = ""
 
array $data = []
 
ilDBInterface $db
 
ilLogger $ds_log
 
string $import_directory = ""
 
string $entity = ""
 
string $schema_version = ""
 
string $component_export_dir = ""
 
string $ds_prefix = "ds"
 
string $version = ""
 
ilSurveyImporter $import
 
ilExport $export
 

Additional Inherited Members

- Data Fields inherited from ilDataSet
const DATASET_NS = 'http://www.ilias.de/Services/DataSet/ds/4_3'
 
const DATASET_NS_PREFIX = 'ds'
 
const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 
int $dircnt = 0
 

Detailed Description

Style Data set class.

This class implements the following entities:

  • sty: table object_data
  • sty_setting: table style_setting
  • sty_char: table style classes
  • sty_char_title: table style class titles
  • sty_parameter: table style_parameter
  • sty_color: table style colors
  • sty_template: table style_template
  • sty_template_class: table style_template_class
  • sty_media_query: table sty_media_query
  • sty_usage: table style_usage
  • sty_container: table sty_rep_container
  • object_style: this is a special entity which allows to export using the ID of the consuming object (e.g. wiki) the "sty" entity will be detemined and exported afterwards (if a non global style has been assigned)
Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e

Definition at line 45 of file class.ilStyleDataSet.php.

Constructor & Destructor Documentation

◆ __construct()

ilStyleDataSet::__construct ( )

Reimplemented from ilDataSet.

Definition at line 56 of file class.ilStyleDataSet.php.

57 {
58 global $DIC;
59
60 $this->db = $DIC->database();
62 $this->log = ilLoggerFactory::getLogger('styl');
63 $this->log->debug("constructed");
64 $this->rbacsystem = $DIC->rbac()->system();
65 $this->user = $DIC->user();
66 $this->style_domain = $DIC->contentStyle()->internal()->domain();
67 $this->content_style_domain = $DIC->contentStyle()->domain();
68 $this->repo = $DIC->contentStyle()->internal()->repo();
69 }
static getLogger(string $a_component_id)
Get component logger.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ilLoggerFactory\getLogger(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getContainerExportConfig()

ilStyleDataSet::getContainerExportConfig ( array  $record,
string  $entity,
string  $schema_version,
string  $field,
string  $value 
)

Reimplemented from ilDataSet.

Definition at line 449 of file class.ilStyleDataSet.php.

456 if ($entity === "sty" && $field === "StyleContainer") {
457 $rid = $this->style_domain->style((int) $record["Id"])->getResourceIdentification();
458 if ($rid) {
459 $container = $this->irss->manageContainer()->getResource($rid);
460 return
463 "images"
464 );
465 }
466 }
467 return null;
468 }
getIRSSContainerExportConfig(StorableResource $source_container, string $source_path, string $target_path="")
string $entity
$container
@noRector
Definition: wac.php:39

References $container, and ilDataSet\getIRSSContainerExportConfig().

+ Here is the call graph for this function:

◆ getDependencies()

ilStyleDataSet::getDependencies ( string  $a_entity,
string  $a_version,
?array  $a_rec = null,
?array  $a_ids = null 
)
protected

Determine the dependent sets of data.

Reimplemented from ilDataSet.

Definition at line 474 of file class.ilStyleDataSet.php.

479 : array {
480 $this->ds_log->debug("entity: " . $a_entity . ", rec: " . print_r($a_rec, true));
481 switch ($a_entity) {
482 case "object_style":
483 $this->ds_log->debug("object id: " . ($a_rec["ObjectId"] ?? null));
484 $style_id = $this->content_style_domain->styleForObjId($a_rec["ObjectId"] ?? 0)->getExportStyleId();
485 $this->ds_log->debug("style id: " . $style_id);
486 //if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id))
487 if ($style_id > 0 && ilObject::_lookupType($style_id) == "sty") { // #0019337 always export style, if valid
488 return array(
489 "sty" => array("ids" => $style_id));
490 }
491 return array();
492 break;
493
494 case "sty":
495 return array(
496 "sty_setting" => array("ids" => $a_rec["Id"] ?? null),
497 "sty_media_query" => array("ids" => $a_rec["Id"] ?? null),
498 "sty_char" => array("ids" => $a_rec["Id"] ?? null),
499 "sty_char_title" => array("ids" => $a_rec["Id"] ?? null),
500 "sty_color" => array("ids" => $a_rec["Id"] ?? null),
501 "sty_parameter" => array("ids" => $a_rec["Id"] ?? null),
502 "sty_template" => array("ids" => $a_rec["Id"] ?? null),
503 "sty_usage" => array("ids" => $a_rec["Id"] ?? null)
504 );
505
506 case "sty_template":
507 return array(
508 "sty_template_class" => array("ids" => $a_rec["Id"] ?? null)
509 );
510 }
511
512 return [];
513 }
static _lookupType(int $id, bool $reference=false)

References ilObject\_lookupType().

+ Here is the call graph for this function:

◆ getSupportedVersions()

ilStyleDataSet::getSupportedVersions ( )

Get supported versions.

Returns
array version

Reimplemented from ilDataSet.

Definition at line 76 of file class.ilStyleDataSet.php.

76 : array
77 {
78 return array("10.0", "8.0", "5.1.0");
79 }

◆ getTypes()

ilStyleDataSet::getTypes ( string  $a_entity,
string  $a_version 
)
protected

Get field types for entity.

Parameters
string$a_entityentity
string$a_versionversion number
Returns
array types array

Reimplemented from ilDataSet.

Definition at line 97 of file class.ilStyleDataSet.php.

97 : array
98 {
99 if ($a_entity == "sty") {
100 switch ($a_version) {
101 case "5.1.0":
102 case "8.0":
103 return array(
104 "Id" => "integer",
105 "Title" => "text",
106 "Description" => "text",
107 "ImagesDir" => "directory"
108 );
109 case "10.0":
110 return array(
111 "Id" => "integer",
112 "Title" => "text",
113 "Description" => "text",
114 "OwnerObj" => "integer",
115 "StyleContainer" => "rscontainer"
116 );
117 }
118 }
119
120 if ($a_entity == "object_style") {
121 switch ($a_version) {
122 case "5.1.0":
123 case "8.0":
124 case "10.0":
125 return array(
126 "ObjectId" => "integer"
127 );
128 }
129 }
130
131 if ($a_entity == "sty_container") {
132 switch ($a_version) {
133 case "10.0":
134 return array(
135 "RefId" => "integer",
136 "Reuse" => "integer"
137 );
138 }
139 }
140
141 if ($a_entity == "sty_setting") {
142 switch ($a_version) {
143 case "5.1.0":
144 case "8.0":
145 case "10.0":
146 return array(
147 "StyleId" => "integer",
148 "Name" => "test",
149 "Value" => "text"
150 );
151 }
152 }
153
154 if ($a_entity == "sty_char") {
155 switch ($a_version) {
156 case "5.1.0":
157 return array(
158 "StyleId" => "integer",
159 "Type" => "text",
160 "Characteristic" => "text",
161 "Hide" => "integer"
162 );
163 case "8.0":
164 case "10.0":
165 return array(
166 "StyleId" => "integer",
167 "Type" => "text",
168 "Characteristic" => "text",
169 "Hide" => "integer",
170 "OrderNr" => "integer",
171 "Outdate" => "integer"
172 );
173 }
174 }
175
176 if ($a_entity == "sty_char_title") {
177 switch ($a_version) {
178 case "8.0":
179 case "10.0":
180 return array(
181 "StyleId" => "integer",
182 "Type" => "text",
183 "Characteristic" => "text",
184 "Lang" => "text",
185 "Title" => "text"
186 );
187 }
188 }
189
190 if ($a_entity == "sty_parameter") {
191 switch ($a_version) {
192 case "5.1.0":
193 case "8.0":
194 case "10.0":
195 return array(
196 "StyleId" => "integer",
197 "Tag" => "text",
198 "Class" => "text",
199 "Parameter" => "text",
200 "Value" => "text",
201 "Type" => "text",
202 "MqId" => "integer",
203 "Custom" => "integer"
204 );
205 }
206 }
207
208 if ($a_entity == "sty_color") {
209 switch ($a_version) {
210 case "5.1.0":
211 case "8.0":
212 case "10.0":
213 return array(
214 "StyleId" => "integer",
215 "ColorName" => "text",
216 "ColorCode" => "text"
217 );
218 }
219 }
220
221 if ($a_entity == "sty_media_query") {
222 switch ($a_version) {
223 case "5.1.0":
224 case "8.0":
225 case "10.0":
226 return array(
227 "Id" => "integer",
228 "StyleId" => "integer",
229 "OrderNr" => "integer",
230 "MQuery" => "text"
231 );
232 }
233 }
234
235 if ($a_entity == "sty_template") {
236 switch ($a_version) {
237 case "5.1.0":
238 case "8.0":
239 case "10.0":
240 return array(
241 "Id" => "integer",
242 "StyleId" => "integer",
243 "Name" => "text",
244 "Preview" => "text",
245 "TempType" => "text"
246 );
247 }
248 }
249
250 if ($a_entity == "sty_template_class") {
251 switch ($a_version) {
252 case "5.1.0":
253 case "8.0":
254 case "10.0":
255 return array(
256 "TemplateId" => "integer",
257 "ClassType" => "text",
258 "Class" => "text"
259 );
260 }
261 }
262
263 if ($a_entity == "sty_usage") {
264 switch ($a_version) {
265 case "5.1.0":
266 case "8.0":
267 case "10.0":
268 return array(
269 "ObjId" => "integer",
270 "StyleId" => "integer"
271 );
272 }
273 }
274 }

◆ getXmlNamespace()

ilStyleDataSet::getXmlNamespace ( string  $a_entity,
string  $a_schema_version 
)

Get xml namespace.

Parameters

return string

Reimplemented from ilDataSet.

Definition at line 86 of file class.ilStyleDataSet.php.

86 : string
87 {
88 return "http://www.ilias.de/xml/Services/Style/" . $a_entity;
89 }

◆ getXmlRecord()

ilStyleDataSet::getXmlRecord ( string  $a_entity,
string  $a_version,
array  $a_set 
)

Get xml record.

Parameters

return array

Reimplemented from ilDataSet.

Definition at line 281 of file class.ilStyleDataSet.php.

281 : array
282 {
283 if ($a_entity == "sty") {
284 $a_set["StyleContainer"] = serialize($this->style_domain->style((int) $a_set["Id"])->getResourceIdentification());
285 }
286
287 return $a_set;
288 }

◆ importRecord()

ilStyleDataSet::importRecord ( string  $a_entity,
array  $a_types,
array  $a_rec,
ilImportMapping  $a_mapping,
string  $a_schema_version 
)

Import record.

Parameters

return void

Reimplemented from ilDataSet.

Definition at line 521 of file class.ilStyleDataSet.php.

521 : void
522 {
523 global $DIC;
524 $service = $DIC->contentStyle()->internal();
525 $access_manager = $service->domain()->access(
526 0,
527 $this->user->getId()
528 );
529 $access_manager->enableWrite(true);
530
531 $style_id = (isset($this->current_obj))
532 ? $this->current_obj->getId()
533 : 0;
534 $characteristic_manager = $service->domain()->characteristic(
535 $style_id,
536 $access_manager
537 );
538
539 $color_manager = $service->domain()->color(
540 $style_id,
541 $access_manager
542 );
543
544 $a_rec = $this->stripTags($a_rec);
545 switch ($a_entity) {
546 case "sty_container":
547 $ref_id = (int) $a_mapping->getMapping(
548 "components/ILIAS/Container",
549 "refs",
550 $a_rec["RefId"]
551 );
552 if ($ref_id > 0) {
553 $this->repo->repositoryContainer()->updateReuse($ref_id, (bool) $a_rec["Reuse"]);
554 }
555 break;
556
557 case "sty":
558 $this->log->debug("Entity: " . $a_entity);
559 if ($new_id = $a_mapping->getMapping('components/ILIAS/Container', 'objs', $a_rec['Id'])) {
560 $newObj = ilObjectFactory::getInstanceByObjId($new_id, false);
561 } else {
562 $newObj = new ilObjStyleSheet();
563 $newObj->create(0, true);
564 }
565
566 $newObj->setTitle($a_rec["Title"]);
567 $newObj->setDescription($a_rec["Description"]);
568 $newObj->update(true);
569
570 $owner_obj_id = (int) $a_mapping->getMapping(
571 "components/ILIAS/ILIASObject",
572 "obj",
573 $a_rec["OwnerObj"] ?? 0
574 );
575 if ($owner_obj_id > 0) {
576 ilObjStyleSheet::writeOwner($owner_obj_id, $newObj->getId());
577 }
578
579 if (array_key_exists("OwnerObj", $a_rec)) {
580 $this->styles_with_explicit_owner[$newObj->getId()] = true;
581 }
582
583 $this->current_obj = $newObj;
584 $a_mapping->addMapping("components/ILIAS/Style", "sty", $a_rec["Id"], $newObj->getId());
585 $a_mapping->addMapping("components/ILIAS/ILIASObject", "obj", $a_rec["Id"], $newObj->getId());
586 $this->log->debug("Added mapping Services/Style sty " . $a_rec["Id"] . " > " . $newObj->getId());
587
588 // up to 9
589 $dir = str_replace("..", "", $a_rec["ImagesDir"] ?? "");
590 if ($dir != "" && $this->getImportDirectory() != "") {
591 $source_dir = $this->getImportDirectory() . "/" . $dir;
592 $sm = $this->style_domain->style($newObj->getId());
593 $sm->createContainerFromLocalDir($source_dir, "images", false);
594 }
595
596 $dir = str_replace("..", "", ($a_rec["StyleContainer"] ?? ""));
597 if ($dir != "" && $this->getImportDirectory() != "") {
598 $source_dir = $this->getImportDirectory() . "/" . $dir;
599 if (is_dir($source_dir)) {
600 $sm = $this->style_domain->style($newObj->getId());
601 $sm->createContainerFromLocalDir($source_dir, "images", false);
602 }
603 }
604 break;
605
606 case "sty_setting":
607 $this->current_obj->writeStyleSetting($a_rec["Name"], $a_rec["Value"]);
608 break;
609
610 case "sty_char":
611 $this->current_obj->addCharacteristic($a_rec["Type"], $a_rec["Characteristic"], $a_rec["Hide"], (int) ($a_rec["OrderNr"] ?? 0), (bool) ($a_rec["Outdated"] ?? false));
612 break;
613
614 case "sty_char_title":
615 $char_repo = $this->repo->characteristic();
616 $char_repo->addTitle(
617 $this->current_obj->getId(),
618 $a_rec["Type"],
619 $a_rec["Characteristic"],
620 $a_rec["Lang"],
621 $a_rec["Title"],
622 );
623 break;
624
625 case "sty_parameter":
626 $mq_id = (int) $a_mapping->getMapping("components/ILIAS/Style", "media_query", $a_rec["MqId"]);
627 $characteristic_manager->replaceParameter($a_rec["Tag"], $a_rec["Class"], $a_rec["Parameter"], $a_rec["Value"], $a_rec["Type"], $mq_id, $a_rec["Custom"]);
628 break;
629
630 case "sty_color":
631 $color_manager->addColor($a_rec["ColorName"], $a_rec["ColorCode"]);
632 break;
633
634 case "sty_media_query":
635 $mq_id = $this->current_obj->addMediaQuery($a_rec["MQuery"], $a_rec["OrderNr"]);
636 $a_mapping->addMapping("components/ILIAS/Style", "media_query", $a_rec["Id"], $mq_id);
637 break;
638
639 case "sty_template":
640 $tid = $this->current_obj->addTemplate($a_rec["TempType"], $a_rec["Name"], array());
641 $a_mapping->addMapping("components/ILIAS/Style", "template", $a_rec["Id"], $tid);
642 break;
643
644 case "sty_template_class":
645 $tid = (int) $a_mapping->getMapping("components/ILIAS/Style", "template", $a_rec["TemplateId"]);
646 $this->current_obj->addTemplateClass($tid, $a_rec["ClassType"], $a_rec["Class"]);
647 break;
648
649 case "sty_usage":
650 $obj_id = (int) $a_mapping->getMapping("components/ILIAS/ILIASObject", "obj", $a_rec["ObjId"]);
651 $style_id = (int) $a_mapping->getMapping("components/ILIAS/Style", "sty", $a_rec["StyleId"]);
652 if ($obj_id > 0 && $style_id > 0) {
653 ilObjStyleSheet::writeStyleUsage($obj_id, $style_id);
654 if (!isset($this->styles_with_explicit_owner[$style_id])) {
655 ilObjStyleSheet::writeOwner($obj_id, $style_id);
656 }
657 }
658 break;
659 }
660 }
stripTags(array $rec, array $omit_keys=[])
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
getMapping(string $a_comp, string $a_entity, string $a_old_id)
Class ilObjStyleSheet.
static writeStyleUsage(int $a_obj_id, int $a_style_id)
Write style usage.
static writeOwner($obj_id, $style_id)
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
$service
Definition: ltiresult.php:44

References $DIC, $service, ilImportMapping\addMapping(), ilObjectFactory\getInstanceByObjId(), ilImportMapping\getMapping(), ILIAS\Repository\int(), ILIAS\Repository\user(), ilObjStyleSheet\writeOwner(), and ilObjStyleSheet\writeStyleUsage().

+ Here is the call graph for this function:

◆ readData()

ilStyleDataSet::readData ( string  $a_entity,
string  $a_version,
array  $a_ids 
)

Read data.

Parameters

return void

Reimplemented from ilDataSet.

Definition at line 295 of file class.ilStyleDataSet.php.

295 : void
296 {
298
299 if (!is_array($a_ids)) {
300 $a_ids = array($a_ids);
301 }
302
303 if ($a_entity == "object_style") {
304 switch ($a_version) {
305 case "5.1.0":
306 case "8.0":
307 case "10.0":
308 foreach ($a_ids as $id) {
309 $this->data[] = array("ObjectId" => $id);
310 }
311 break;
312 }
313 }
314
315 if ($a_entity == "sty_container") {
316 switch ($a_version) {
317 case "10.0":
318 $this->getDirectDataFromQuery("SELECT ref_id, reuse" .
319 " FROM sty_rep_container" .
320 " WHERE " . $ilDB->in("ref_id", $a_ids, false, "integer"));
321 break;
322 }
323 }
324
325 if ($a_entity == "sty") {
326 switch ($a_version) {
327 case "5.1.0":
328 case "8.0":
329 case "10.0":
330 $this->getDirectDataFromQuery("SELECT o.title, o.description, o.obj_id id, s.owner_obj" .
331 " FROM object_data o JOIN style_data s ON o.obj_id = s.id" .
332 " WHERE " . $ilDB->in("o.obj_id", $a_ids, false, "integer"));
333 break;
334 }
335 }
336
337 if ($a_entity == "sty_setting") {
338 switch ($a_version) {
339 case "5.1.0":
340 case "8.0":
341 case "10.0":
342 $this->getDirectDataFromQuery("SELECT style_id, name, value" .
343 " FROM style_setting " .
344 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
345 break;
346 }
347 }
348
349 if ($a_entity == "sty_char") {
350 switch ($a_version) {
351 case "5.1.0":
352 $this->getDirectDataFromQuery("SELECT style_id, type, characteristic, hide" .
353 " FROM style_char " .
354 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
355 // no break
356 case "8.0":
357 case "10.0":
358 $this->getDirectDataFromQuery("SELECT style_id, type, characteristic, hide, order_nr, outdated" .
359 " FROM style_char " .
360 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
361 break;
362 }
363 }
364
365 if ($a_entity == "sty_char_title") {
366 switch ($a_version) {
367 case "8.0":
368 case "10.0":
369 $this->getDirectDataFromQuery("SELECT style_id, type, characteristic, lang, title" .
370 " FROM style_char_title " .
371 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
372 break;
373 }
374 }
375
376 if ($a_entity == "sty_parameter") {
377 switch ($a_version) {
378 case "5.1.0":
379 case "8.0":
380 case "10.0":
381 $this->getDirectDataFromQuery("SELECT style_id, tag, class, parameter, value, type, mq_id, custom" .
382 " FROM style_parameter " .
383 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
384 break;
385 }
386 }
387
388 if ($a_entity == "sty_color") {
389 switch ($a_version) {
390 case "5.1.0":
391 case "8.0":
392 case "10.0":
393 $this->getDirectDataFromQuery("SELECT style_id, color_name, color_code" .
394 " FROM style_color " .
395 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
396 break;
397 }
398 }
399
400 if ($a_entity == "sty_media_query") {
401 switch ($a_version) {
402 case "5.1.0":
403 case "8.0":
404 case "10.0":
405 $this->getDirectDataFromQuery("SELECT id, style_id, order_nr, mquery m_query" .
406 " FROM sty_media_query " .
407 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
408 break;
409 }
410 }
411
412 if ($a_entity == "sty_template") {
413 switch ($a_version) {
414 case "5.1.0":
415 case "8.0":
416 case "10.0":
417 $this->getDirectDataFromQuery("SELECT id, style_id, name, preview, temp_type" .
418 " FROM style_template " .
419 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
420 break;
421 }
422 }
423
424 if ($a_entity == "sty_template_class") {
425 switch ($a_version) {
426 case "5.1.0":
427 case "8.0":
428 case "10.0":
429 $this->getDirectDataFromQuery("SELECT template_id, class_type, class" .
430 " FROM style_template_class " .
431 " WHERE " . $ilDB->in("template_id", $a_ids, false, "integer"));
432 break;
433 }
434 }
435
436 if ($a_entity == "sty_usage") {
437 switch ($a_version) {
438 case "5.1.0":
439 case "8.0":
440 case "10.0":
441 $this->getDirectDataFromQuery("SELECT obj_id, style_id" .
442 " FROM style_usage " .
443 " WHERE " . $ilDB->in("style_id", $a_ids, false, "integer"));
444 break;
445 }
446 }
447 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
getDirectDataFromQuery(string $a_query, bool $a_convert_to_leading_upper=true, bool $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
ilDBInterface $db

References ilDataSet\$db, $id, $ilDB, and ilDataSet\getDirectDataFromQuery().

+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

Content DomainService ilStyleDataSet::$content_style_domain
protected

Definition at line 47 of file class.ilStyleDataSet.php.

◆ $current_obj

ilObjStyleSheet ilStyleDataSet::$current_obj = null
protected

Definition at line 49 of file class.ilStyleDataSet.php.

◆ $log

ilLogger ilStyleDataSet::$log
protected

Definition at line 51 of file class.ilStyleDataSet.php.

◆ $rbacsystem

ilRbacSystem ilStyleDataSet::$rbacsystem
protected

Definition at line 52 of file class.ilStyleDataSet.php.

◆ $repo

Content InternalRepoService ilStyleDataSet::$repo
protected

Definition at line 50 of file class.ilStyleDataSet.php.

◆ $style_domain

Content InternalDomainService ilStyleDataSet::$style_domain
protected

Definition at line 48 of file class.ilStyleDataSet.php.

◆ $styles_with_explicit_owner

array ilStyleDataSet::$styles_with_explicit_owner = []
protected

Definition at line 54 of file class.ilStyleDataSet.php.

◆ $user

ilObjUser ilStyleDataSet::$user
protected

Definition at line 53 of file class.ilStyleDataSet.php.


The documentation for this class was generated from the following file: