ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMediaPoolExporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilMediaPoolExporter:
+ Collaboration diagram for ilMediaPoolExporter:

Public Member Functions

 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Private Attributes

ilMediaPoolDataSet $ds
 
ilMediaPoolExportConfig $config
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 
- Protected Attributes inherited from ilXmlExporter
ilExport $exp
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Export2 class for media pools

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilMediaPoolExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilMediaPoolExporter::getValidSchemaVersions ( string  $a_entity)

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example: return array ( "4.1.0" => array( "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1", "xsd_file" => "ilias_md_4_1.xsd", "min" => "4.1.0", "max" => "") );

Reimplemented from ilXmlExporter.

Definition at line 132 of file class.ilMediaPoolExporter.php.

132 : array
133 {
134 return array(
135 "5.1.0" => array(
136 "namespace" => "https://www.ilias.de/Modules/MediaPool/mep/5_1",
137 "xsd_file" => "ilias_mep_5_1.xsd",
138 "uses_dataset" => true,
139 "min" => "5.1.0",
140 "max" => ""),
141 "4.1.0" => array(
142 "namespace" => "https://www.ilias.de/Modules/MediaPool/mep/4_1",
143 "xsd_file" => "ilias_mep_4_1.xsd",
144 "uses_dataset" => true,
145 "min" => "4.1.0",
146 "max" => "")
147 );
148 }

◆ getXmlExportHeadDependencies()

ilMediaPoolExporter::getXmlExportHeadDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Get head dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

50 : array {
51 $mob_ids = array();
52
53 foreach ($a_ids as $id) {
55 foreach ($m_ids as $m) {
56 $mob_ids[] = $m;
57 }
58 }
59
60 if ($this->config->getMasterLanguageOnly()) {
61 return array();
62 }
63
64 return array(
65 array(
66 "component" => "components/ILIAS/MediaObjects",
67 "entity" => "mob",
68 "ids" => $mob_ids)
69 );
70 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getAllMobIds(int $a_id)

References $id, and ilObjMediaPool\getAllMobIds().

+ Here is the call graph for this function:

◆ getXmlExportTailDependencies()

ilMediaPoolExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Get tail dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 72 of file class.ilMediaPoolExporter.php.

76 : array {
77 $pg_ids = array();
78
79 foreach ($a_ids as $id) {
80 $pages = ilMediaPoolItem::getIdsForType($id, "pg");
81 foreach ($pages as $p) {
82 $pg_ids[] = "mep:" . $p;
83 }
84 }
85
86 $deps = array(
87 array(
88 "component" => "components/ILIAS/COPage",
89 "entity" => "pg",
90 "ids" => $pg_ids)
91 );
92
93 if (!$this->config->getMasterLanguageOnly()) {
94 $deps[] = array(
95 "component" => "components/ILIAS/ILIASObject",
96 "entity" => "transl",
97 "ids" => $a_ids);
98 $deps[] = array(
99 "component" => "components/ILIAS/ILIASObject",
100 "entity" => "transl_entry",
101 "ids" => $a_ids);
102 }
103
104 $deps[] = array(
105 "component" => "components/ILIAS/ILIASObject",
106 "entity" => "tile",
107 "ids" => $a_ids);
108
109 $md_ids = [];
110 foreach ($a_ids as $id) {
111 $md_ids[] = $id . ':0:mep';
112 }
113 if (!empty($md_ids)) {
114 $deps[] = [
115 'component' => 'components/ILIAS/MetaData',
116 'entity' => 'md',
117 'ids' => $md_ids,
118 ];
119 }
120
121 return $deps;
122 }
static getIdsForType(int $a_id, string $a_type)
Get all ids for type.

References $id, and ilMediaPoolItem\getIdsForType().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

ilMediaPoolExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)

Reimplemented from ilXmlExporter.

Definition at line 124 of file class.ilMediaPoolExporter.php.

128 : string {
129 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
130 }

Field Documentation

◆ $config

ilMediaPoolExportConfig ilMediaPoolExporter::$config
private

Definition at line 27 of file class.ilMediaPoolExporter.php.

◆ $ds

ilMediaPoolDataSet ilMediaPoolExporter::$ds
private

Definition at line 26 of file class.ilMediaPoolExporter.php.


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