ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCOPageExporter Class Reference

Exporter class for meta data. More...

+ Inheritance diagram for ilCOPageExporter:
+ Collaboration diagram for ilCOPageExporter:

Public Member Functions

 init ()
 Initialisation.
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies.
 getXmlRepresentation ($a_entity, $a_target_release, $a_id)
 Get xml representation.
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to.
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor.
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories.
 getRelativeExportDirectory ()
 Get relative export directory.
 getAbsoluteExportDirectory ()
 Get absolute export directory.
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies.
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version.

Private Attributes

 $ds

Additional Inherited Members

- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 $dir_absolute

Detailed Description

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.

Member Function Documentation

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

Reimplemented from ilXmlExporter.

Definition at line 112 of file class.ilCOPageExporter.php.

{
return array (
"4.1.0" => array(
"namespace" => "http://www.ilias.de/Services/COPage/pg/4_1",
"xsd_file" => "ilias_pg_4_1.xsd",
"min" => "4.1.0",
"max" => "")
);
}
ilCOPageExporter::getXmlExportHeadDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get head dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 33 of file class.ilCOPageExporter.php.

References $file, $files, ilObjFile\_getFilesOfObject(), ilObjMediaObject\_getMobsOfObject(), and ilObject\_lookupType().

{
// get all media objects and files of the page
include_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
include_once("./Modules/File/classes/class.ilObjFile.php");
$mob_ids = array();
$file_ids = array();
foreach ($a_ids as $pg_id)
{
$pg_id = explode(":", $pg_id);
// get media objects
$mids = ilObjMediaObject::_getMobsOfObject($pg_id[0].":pg", $pg_id[1]);
foreach ($mids as $mid)
{
if (ilObject::_lookupType($mid) == "mob")
{
$mob_ids[] = $mid;
}
}
// get files
$files = ilObjFile::_getFilesOfObject($pg_id[0].":pg", $pg_id[1]);
foreach ($files as $file)
{
if (ilObject::_lookupType($file) == "file")
{
$file_ids[] = $file;
}
}
}
return array (
array(
"component" => "Services/MediaObjects",
"entity" => "mob",
"ids" => $mob_ids),
array(
"component" => "Modules/File",
"entity" => "file",
"ids" => $file_ids)
);
}

+ Here is the call graph for this function:

ilCOPageExporter::getXmlRepresentation (   $a_entity,
  $a_target_release,
  $a_id 
)

Get xml representation.

Parameters
stringentity
stringtarget release
arrayids
Returns
string xml

Reimplemented from ilXmlExporter.

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

{
include_once("./Services/COPage/classes/class.ilPageObject.php");
$id = explode(":", $a_id);
$page_object = new ilPageObject($id[0], $id[1]);
$page_object->buildDom();
$page_object->insertInstIntoIDs(IL_INST_ID);
$pxml = $page_object->getXMLFromDom(false, false, false, "", true);
$pxml = str_replace("&","&", $pxml);
$xml = "<PageObject>";
$xml.= $pxml;
$xml.= "</PageObject>";
$page_object->freeDom();
return $xml;
}
ilCOPageExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

Definition at line 20 of file class.ilCOPageExporter.php.

{
}

Field Documentation

ilCOPageExporter::$ds
private

Definition at line 15 of file class.ilCOPageExporter.php.


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