Exporter class for meta data.
More...
|
| getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids) |
| Get head dependencies. More...
|
|
| getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids) |
| Get tail dependencies. More...
|
|
| getXmlRepresentation ($a_entity, $a_schema_version, $a_id) |
| Get xml representation. More...
|
|
| getValidSchemaVersions ($a_entity) |
| Returns schema versions that the component can export to. More...
|
|
| __construct () |
| Constructor. More...
|
|
| setExport (ilExport $a_exp) |
| Set export object. More...
|
|
| getExport () |
| Get export. More...
|
|
| getXmlRepresentation ($a_entity, $a_schema_version, $a_id) |
| Get xml representation. More...
|
|
| init () |
|
| setExportDirectories ($a_dir_relative, $a_dir_absolute) |
| Export directories. More...
|
|
| getRelativeExportDirectory () |
| Get relative export directory. More...
|
|
| getAbsoluteExportDirectory () |
| Get absolute export directory. More...
|
|
| getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids) |
| Get head dependencies. More...
|
|
| getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids) |
| Get tail dependencies. More...
|
|
| getValidSchemaVersions ($a_entity) |
| Returns schema versions that the component can export to. More...
|
|
| determineSchemaVersion ($a_entity, $a_target_release) |
| Determine schema version. More...
|
|
Exporter class for meta data.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- Id
Definition at line 13 of file class.ilCOPageExporter.php.
◆ getValidSchemaVersions()
ilCOPageExporter::getValidSchemaVersions |
( |
|
$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.
- Returns
Definition at line 221 of file class.ilCOPageExporter.php.
References $id, array, ilPageComponentPluginExporter\setPCProperties(), and ilPageComponentPluginExporter\setPCVersion().
223 if ($a_entity ==
"pg") {
226 "namespace" =>
"http://www.ilias.de/Services/COPage/pg/4_2",
227 "xsd_file" =>
"ilias_pg_4_2.xsd",
231 "namespace" =>
"http://www.ilias.de/Services/COPage/pg/4_1",
232 "xsd_file" =>
"ilias_pg_4_1.xsd",
237 if ($a_entity ==
"pgtp") {
240 "namespace" =>
"http://www.ilias.de/Services/COPage/pgtp/4_1",
241 "xsd_file" =>
"ilias_pgtp_4_1.xsd",
242 "uses_dataset" =>
true,
Create styles array
The data for the language used.
◆ getXmlExportHeadDependencies()
ilCOPageExporter::getXmlExportHeadDependencies |
( |
|
$a_entity, |
|
|
|
$a_target_release, |
|
|
|
$a_ids |
|
) |
| |
Get head dependencies.
- Parameters
-
string | entity |
string | target release |
array | ids |
- Returns
- array array of array with keys "component", entity", "ids"
Definition at line 81 of file class.ilCOPageExporter.php.
References $file, $files, $lang, ilObjFile\_getFilesOfObject(), ilObjMediaObject\_getMobsOfObject(), ilObject\_lookupType(), and array.
83 if ($a_entity ==
"pg") {
85 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
86 include_once(
"./Modules/File/classes/class.ilObjFile.php");
89 foreach ($a_ids as $pg_id) {
90 $pg_id = explode(
":", $pg_id);
92 $lang = ($this->config->getMasterLanguageOnly())
97 if ($this->config->getIncludeMedia()) {
99 foreach ($mids as $mid) {
117 "component" =>
"Services/MediaObjects",
121 "component" =>
"Modules/File",
static _getFilesOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-")
get all files of an object
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
◆ getXmlExportTailDependencies()
ilCOPageExporter::getXmlExportTailDependencies |
( |
|
$a_entity, |
|
|
|
$a_target_release, |
|
|
|
$a_ids |
|
) |
| |
Get tail dependencies.
- Parameters
-
string | entity |
string | target release |
array | ids |
- Returns
- array array of array with keys "component", entity", "ids"
Definition at line 138 of file class.ilCOPageExporter.php.
References $id, and array.
140 if ($a_entity ==
"pgtp") {
142 foreach ($a_ids as
$id) {
143 $pg_ids[] =
"stys:" .
$id;
148 "component" =>
"Services/COPage",
154 if (!empty($this->plugin_dependencies)) {
156 return array_values($this->plugin_dependencies);
if(!array_key_exists('StateId', $_REQUEST)) $id
Create styles array
The data for the language used.
◆ getXmlRepresentation()
ilCOPageExporter::getXmlRepresentation |
( |
|
$a_entity, |
|
|
|
$a_schema_version, |
|
|
|
$a_id |
|
) |
| |
Get xml representation.
- Parameters
-
string | entity |
string | schema version |
array | ids |
- Returns
- string xml
Definition at line 171 of file class.ilCOPageExporter.php.
References $id, $l, $t, $xml, array, ilPageObjectFactory\getInstance(), and ilPageObject\lookupTranslations().
173 if ($a_entity ==
"pg") {
174 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
176 $id = explode(
":", $a_id);
179 if (!$this->config->getMasterLanguageOnly()) {
181 foreach ($trans as
$t) {
188 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
190 foreach ($langs as
$l) {
192 $page_object->buildDom();
193 $page_object->insertInstIntoIDs(IL_INST_ID);
194 $this->extractPluginProperties($page_object);
195 $pxml = $page_object->getXMLFromDom(
false,
false,
false,
"",
true);
196 $pxml = str_replace(
"&",
"&", $pxml);
197 $a_media = ($this->config->getIncludeMedia())
199 :
'WithoutMedia="1"';
200 $xml.=
'<PageObject Language="' . $l .
'" Active="' . $page_object->getActive() .
'" ActivationStart="' . $page_object->getActivationStart() .
'" ActivationEnd="' .
201 $page_object->getActivationEnd() .
'" ShowActivationInfo="' . $page_object->getShowActivationInfo() .
'" ' . $a_media .
'>';
203 $xml.=
"</PageObject>";
204 $page_object->freeDom();
209 if ($a_entity ==
"pgtp") {
210 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id,
"",
true,
true);
if(!array_key_exists('StateId', $_REQUEST)) $id
Create styles array
The data for the language used.
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
static lookupTranslations($a_parent_type, $a_id)
Lookup translations.
◆ $config
ilCOPageExporter::$config |
|
protected |
◆ $ds
◆ $plugin_dependencies
ilCOPageExporter::$plugin_dependencies = array() |
|
protected |
The documentation for this class was generated from the following file: