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)
 Get xml representation. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- 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)

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. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array

Reimplemented from ilXmlExporter.

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 
)

Get xml representation.

Parameters
stringentity
stringschema version
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

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

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 }
Class ilObjStyleSheet.
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.
getAbsoluteExportDirectory()
Get absolute export directory.

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

+ Here is the call graph for this function:

◆ init()

ilStyleExporter::init ( )

Reimplemented from ilXmlExporter.

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

17 {
18
19 }

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