ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilStyleExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once './Services/Export/classes/class.ilXmlExporter.php';
5
15{
16 public function init()
17 {
18
19 }
20
21 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
22 {
23 include_once "Services/Style/classes/class.ilObjStyleSheet.php";
24 $style = new ilObjStyleSheet($a_id, false);
25
26 // images
27 $target = $this->getAbsoluteExportDirectory();
28 if($target && !is_dir($target))
29 {
30 ilUtil::makeDirParents($target);
31 }
32 ilUtil::rCopy($style->getImagesDirectory(), $target);
33
34 return "<StyleSheetExport>".
35 "<ImagePath>".$this->getRelativeExportDirectory()."</ImagePath>".
36 $style->getXML().
37 "</StyleSheetExport>";
38 }
39
40 public function getValidSchemaVersions($a_entity)
41 {
42 return array (
43 "5.0.0" => array(
44 "namespace" => "http://www.ilias.de/Services/Style/5_0",
45 "xsd_file" => "ilias_style_5_0.xsd",
46 "uses_dataset" => false,
47 "min" => "5.0.0",
48 "max" => "")
49 );
50 }
51}
Class ilObjStyleSheet.
Style export definition.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static makeDirParents($a_dir)
Create a new directory and all parent directories.
Xml Exporter class.
getAbsoluteExportDirectory()
Get absolute export directory.