ILIAS  release_8 Revision v8.24
class.ilMediaPoolExporter.php
Go to the documentation of this file.
1<?php
2
25{
28
29 public function init(): void
30 {
31 $this->ds = new ilMediaPoolDataSet();
32 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
33 $this->ds->setDSPrefix("ds");
34 $this->config = $this->getExport()->getConfig("Modules/MediaPool");
35 if ($this->config->getMasterLanguageOnly()) {
36 $conf = $this->getExport()->getConfig("Services/COPage");
37 $conf->setMasterLanguageOnly(true, $this->config->getIncludeMedia());
38 $this->ds->setMasterLanguageOnly(true);
39 }
40 }
41
43 string $a_entity,
44 string $a_target_release,
45 array $a_ids
46 ): array {
47 $mob_ids = array();
48
49 foreach ($a_ids as $id) {
51 foreach ($m_ids as $m) {
52 $mob_ids[] = $m;
53 }
54 }
55
56 if ($this->config->getMasterLanguageOnly()) {
57 return array();
58 }
59
60 return array(
61 array(
62 "component" => "Services/MediaObjects",
63 "entity" => "mob",
64 "ids" => $mob_ids)
65 );
66 }
67
69 string $a_entity,
70 string $a_target_release,
71 array $a_ids
72 ): array {
73 $pg_ids = array();
74
75 foreach ($a_ids as $id) {
76 $pages = ilMediaPoolItem::getIdsForType($id, "pg");
77 foreach ($pages as $p) {
78 $pg_ids[] = "mep:" . $p;
79 }
80 }
81
82 $deps = array(
83 array(
84 "component" => "Services/COPage",
85 "entity" => "pg",
86 "ids" => $pg_ids)
87 );
88
89 if (!$this->config->getMasterLanguageOnly()) {
90 $deps[] = array(
91 "component" => "Services/Object",
92 "entity" => "transl",
93 "ids" => $a_ids);
94 $deps[] = array(
95 "component" => "Services/Object",
96 "entity" => "transl_entry",
97 "ids" => $a_ids);
98 }
99
100 $deps[] = array(
101 "component" => "Services/Object",
102 "entity" => "tile",
103 "ids" => $a_ids);
104
105 return $deps;
106 }
107
108 public function getXmlRepresentation(
109 string $a_entity,
110 string $a_schema_version,
111 string $a_id
112 ): string {
113 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
114 }
115
116 public function getValidSchemaVersions(string $a_entity): array
117 {
118 return array(
119 "5.1.0" => array(
120 "namespace" => "https://www.ilias.de/Modules/MediaPool/mep/5_1",
121 "xsd_file" => "ilias_mep_5_1.xsd",
122 "uses_dataset" => true,
123 "min" => "5.1.0",
124 "max" => ""),
125 "4.1.0" => array(
126 "namespace" => "https://www.ilias.de/Modules/MediaPool/mep/4_1",
127 "xsd_file" => "ilias_mep_4_1.xsd",
128 "uses_dataset" => true,
129 "min" => "4.1.0",
130 "max" => "")
131 );
132 }
133}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
return true
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
getXmlExportHeadDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get head dependencies.
static getIdsForType(int $a_id, string $a_type)
Get all ids for type.
static getAllMobIds(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']