ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilStyleExporter Class Reference

Style export definition. More...

+ Inheritance diagram for ilStyleExporter:
+ Collaboration diagram for ilStyleExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 
 getValidSchemaVersions ($a_entity)
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 

Detailed Description

Style export definition.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 14 of file class.ilStyleExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilStyleExporter::getValidSchemaVersions (   $a_entity)

Definition at line 40 of file class.ilStyleExporter.php.

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  }

◆ getXmlRepresentation()

ilStyleExporter::getXmlRepresentation (   $a_entity,
  $a_schema_version,
  $a_id 
)

Definition at line 21 of file class.ilStyleExporter.php.

References ilXmlExporter\getAbsoluteExportDirectory(), ilUtil\makeDirParents(), and ilUtil\rCopy().

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  }
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.
getAbsoluteExportDirectory()
Get absolute export directory.
Class ilObjStyleSheet.
+ Here is the call graph for this function:

◆ init()

ilStyleExporter::init ( )

Definition at line 16 of file class.ilStyleExporter.php.

17  {
18 
19  }

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