ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
4 include_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 }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Xml Exporter class.
getValidSchemaVersions($a_entity)
getAbsoluteExportDirectory()
Get absolute export directory.
Class ilObjStyleSheet.
Style export definition.