ILIAS  trunk Revision v11.0_alpha-1846-g895b5f47236
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ...> ... 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
 
 $log
 
 $rbacsystem
 
 $user
 
- 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
  • 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 44 of file class.ilStyleDataSet.php.

Constructor & Destructor Documentation

◆ __construct()

ilStyleDataSet::__construct ( )

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

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

66  {
67  global $DIC;
68 
69  $this->db = $DIC->database();
71  $this->log = ilLoggerFactory::getLogger('styl');
72  $this->log->debug("constructed");
73  $this->rbacsystem = $DIC->rbac()->system();
74  $this->user = $DIC->user();
75  $this->style_domain = $DIC->contentStyle()->internal()->domain();
76  $this->content_style_domain = $DIC->contentStyle()->domain();
77  $this->repo = $DIC->contentStyle()->internal()->repo();
78  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ 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 
)

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

References $container, ilDataSet\getIRSSContainerExportConfig(), and null.

444  if ($entity === "sty" && $field === "StyleContainer") {
445  $rid = $this->style_domain->style((int) $record["Id"])->getResourceIdentification();
446  if ($rid) {
447  $container = $this->irss->manageContainer()->getResource($rid);
448  return
450  $container,
451  "images"
452  );
453  }
454  }
455  return null;
456  }
getIRSSContainerExportConfig(StorableResource $source_container, string $source_path, string $target_path="")
$container
Definition: wac.php:36
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
string $entity
+ 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.

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

References ilObject\_lookupType(), and null.

467  : array {
468  $this->ds_log->debug("entity: " . $a_entity . ", rec: " . print_r($a_rec, true));
469  switch ($a_entity) {
470  case "object_style":
471  $this->ds_log->debug("object id: " . ($a_rec["ObjectId"] ?? null));
472  $style_id = $this->content_style_domain->styleForObjId($a_rec["ObjectId"] ?? 0)->getExportStyleId();
473  $this->ds_log->debug("style id: " . $style_id);
474  //if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id))
475  if ($style_id > 0 && ilObject::_lookupType($style_id) == "sty") { // #0019337 always export style, if valid
476  return array(
477  "sty" => array("ids" => $style_id));
478  }
479  return array();
480  break;
481 
482  case "sty":
483  return array(
484  "sty_setting" => array("ids" => $a_rec["Id"] ?? null),
485  "sty_media_query" => array("ids" => $a_rec["Id"] ?? null),
486  "sty_char" => array("ids" => $a_rec["Id"] ?? null),
487  "sty_char_title" => array("ids" => $a_rec["Id"] ?? null),
488  "sty_color" => array("ids" => $a_rec["Id"] ?? null),
489  "sty_parameter" => array("ids" => $a_rec["Id"] ?? null),
490  "sty_template" => array("ids" => $a_rec["Id"] ?? null),
491  "sty_usage" => array("ids" => $a_rec["Id"] ?? null)
492  );
493 
494  case "sty_template":
495  return array(
496  "sty_template_class" => array("ids" => $a_rec["Id"] ?? null)
497  );
498  }
499 
500  return [];
501  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ getSupportedVersions()

ilStyleDataSet::getSupportedVersions ( )

Get supported versions.

Returns
array version

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

85  : array
86  {
87  return array("10.0", "8.0", "5.1.0");
88  }

◆ 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

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

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

◆ getXmlNamespace()

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

Get xml namespace.

Parameters

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

95  : string
96  {
97  return "http://www.ilias.de/xml/Services/Style/" . $a_entity;
98  }

◆ getXmlRecord()

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

Get xml record.

Parameters

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

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

◆ importRecord()

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

Import record.

Parameters

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

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

509  : void
510  {
511  global $DIC;
512  $service = $DIC->contentStyle()->internal();
513  $access_manager = $service->domain()->access(
514  0,
515  $this->user->getId()
516  );
517  $access_manager->enableWrite(true);
518 
519  $style_id = (isset($this->current_obj))
520  ? $this->current_obj->getId()
521  : 0;
522  $characteristic_manager = $service->domain()->characteristic(
523  $style_id,
524  $access_manager
525  );
526 
527  $color_manager = $service->domain()->color(
528  $style_id,
529  $access_manager
530  );
531 
532  $a_rec = $this->stripTags($a_rec);
533  switch ($a_entity) {
534  case "sty":
535  $this->log->debug("Entity: " . $a_entity);
536  if ($new_id = $a_mapping->getMapping('components/ILIAS/Container', 'objs', $a_rec['Id'])) {
537  $newObj = ilObjectFactory::getInstanceByObjId($new_id, false);
538  } else {
539  $newObj = new ilObjStyleSheet();
540  $newObj->create(0, true);
541  }
542 
543  $newObj->setTitle($a_rec["Title"]);
544  $newObj->setDescription($a_rec["Description"]);
545  $newObj->update(true);
546 
547  $this->current_obj = $newObj;
548  $a_mapping->addMapping("components/ILIAS/Style", "sty", $a_rec["Id"], $newObj->getId());
549  $a_mapping->addMapping("components/ILIAS/ILIASObject", "obj", $a_rec["Id"], $newObj->getId());
550  $this->log->debug("Added mapping Services/Style sty " . $a_rec["Id"] . " > " . $newObj->getId());
551 
552  // up to 9
553  $dir = str_replace("..", "", $a_rec["ImagesDir"] ?? "");
554  if ($dir != "" && $this->getImportDirectory() != "") {
555  $source_dir = $this->getImportDirectory() . "/" . $dir;
556  $sm = $this->style_domain->style($newObj->getId());
557  $sm->createContainerFromLocalDir($source_dir, "images", false);
558  }
559 
560  $dir = str_replace("..", "", ($a_rec["StyleContainer"] ?? ""));
561  if ($dir != "" && $this->getImportDirectory() != "") {
562  $source_dir = $this->getImportDirectory() . "/" . $dir;
563  if (is_dir($source_dir)) {
564  $sm = $this->style_domain->style($newObj->getId());
565  $sm->createContainerFromLocalDir($source_dir, "images", false);
566  }
567  }
568  break;
569 
570  case "sty_setting":
571  $this->current_obj->writeStyleSetting($a_rec["Name"], $a_rec["Value"]);
572  break;
573 
574  case "sty_char":
575  $this->current_obj->addCharacteristic($a_rec["Type"], $a_rec["Characteristic"], $a_rec["Hide"], (int) ($a_rec["OrderNr"] ?? 0), (bool) ($a_rec["Outdated"] ?? false));
576  break;
577 
578  case "sty_char_title":
579  $char_repo = $this->repo->characteristic();
580  $char_repo->addTitle(
581  $this->current_obj->getId(),
582  $a_rec["Type"],
583  $a_rec["Characteristic"],
584  $a_rec["Lang"],
585  $a_rec["Title"],
586  );
587  break;
588 
589  case "sty_parameter":
590  $mq_id = (int) $a_mapping->getMapping("components/ILIAS/Style", "media_query", $a_rec["MqId"]);
591  $characteristic_manager->replaceParameter($a_rec["Tag"], $a_rec["Class"], $a_rec["Parameter"], $a_rec["Value"], $a_rec["Type"], $mq_id, $a_rec["Custom"]);
592  break;
593 
594  case "sty_color":
595  $color_manager->addColor($a_rec["ColorName"], $a_rec["ColorCode"]);
596  break;
597 
598  case "sty_media_query":
599  $mq_id = $this->current_obj->addMediaQuery($a_rec["MQuery"], $a_rec["OrderNr"]);
600  $a_mapping->addMapping("components/ILIAS/Style", "media_query", $a_rec["Id"], $mq_id);
601  break;
602 
603  case "sty_template":
604  $tid = $this->current_obj->addTemplate($a_rec["TempType"], $a_rec["Name"], array());
605  $a_mapping->addMapping("components/ILIAS/Style", "template", $a_rec["Id"], $tid);
606  break;
607 
608  case "sty_template_class":
609  $tid = (int) $a_mapping->getMapping("components/ILIAS/Style", "template", $a_rec["TemplateId"]);
610  $this->current_obj->addTemplateClass($tid, $a_rec["ClassType"], $a_rec["Class"]);
611  break;
612 
613  case "sty_usage":
614  $obj_id = (int) $a_mapping->getMapping("components/ILIAS/ILIASObject", "obj", $a_rec["ObjId"]);
615  $style_id = (int) $a_mapping->getMapping("components/ILIAS/Style", "sty", $a_rec["StyleId"]);
616  if ($obj_id > 0 && $style_id > 0) {
617  ilObjStyleSheet::writeStyleUsage($obj_id, $style_id);
618  ilObjStyleSheet::writeOwner($obj_id, $style_id);
619  }
620  break;
621  }
622  }
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
static writeOwner($obj_id, $style_id)
getMapping(string $a_comp, string $a_entity, string $a_old_id)
global $DIC
Definition: shib_login.php:22
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static writeStyleUsage(int $a_obj_id, int $a_style_id)
Write style usage.
stripTags(array $rec, array $omit_keys=[])
$service
Definition: ltiservices.php:40
+ Here is the call graph for this function:

◆ readData()

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

Read data.

Parameters

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

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

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

Field Documentation

◆ $content_style_domain

Content DomainService ilStyleDataSet::$content_style_domain
protected

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

◆ $current_obj

ilObjStyleSheet ilStyleDataSet::$current_obj = null
protected

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

◆ $log

ilStyleDataSet::$log
protected

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

◆ $rbacsystem

ilStyleDataSet::$rbacsystem
protected

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

◆ $repo

Content InternalRepoService ilStyleDataSet::$repo
protected

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

◆ $style_domain

Content InternalDomainService ilStyleDataSet::$style_domain
protected

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

◆ $user

ilStyleDataSet::$user
protected

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


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