ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilGroupExporter Class Reference

Folder export. More...

+ Inheritance diagram for ilGroupExporter:
+ Collaboration diagram for ilGroupExporter:

Public Member Functions

 __construct ()
 Constructor. More...
 
 init ()
 Init export. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. 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...
 

Private Attributes

 $writer = null
 

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
 
 $exp
 

Detailed Description

Folder export.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 17 of file class.ilGroupExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilGroupExporter::__construct ( )

Constructor.

Reimplemented from ilXmlExporter.

Definition at line 24 of file class.ilGroupExporter.php.

25 {
26 }

Member Function Documentation

◆ getValidSchemaVersions()

ilGroupExporter::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 88 of file class.ilGroupExporter.php.

89 {
90 return array(
91 "4.1.0" => array(
92 "namespace" => "http://www.ilias.de/Modules/Group/grp/4_1",
93 "xsd_file" => "ilias_grp_4_1.xsd",
94 "uses_dataset" => false,
95 "min" => "4.1.0",
96 "max" => "4.4.999"),
97 "5.0.0" => array(
98 "namespace" => "http://www.ilias.de/Modules/Group/grp/5_0",
99 "xsd_file" => "ilias_grp_5_0.xsd",
100 "uses_dataset" => false,
101 "min" => "5.0.0",
102 "max" => "")
103 );
104 }

◆ getXmlExportHeadDependencies()

ilGroupExporter::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 44 of file class.ilGroupExporter.php.

45 {
46 // always trigger container because of co-page(s)
47 return array(
48 array(
49 'component' => 'Services/Container',
50 'entity' => 'struct',
51 'ids' => $a_ids
52 )
53 );
54 }

◆ getXmlRepresentation()

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

Get xml.

Parameters
object$a_entity
object$a_schema_version
object$a_id
Returns

Reimplemented from ilXmlExporter.

Definition at line 64 of file class.ilGroupExporter.php.

65 {
66 $group_ref_id = end(ilObject::_getAllReferences($a_id));
67 $group = ilObjectFactory::getInstanceByRefId($group_ref_id, false);
68
69 if (!$group instanceof ilObjGroup) {
70 $GLOBALS['DIC']->logger()->grp()->warning($a_id . ' is not instance of type group');
71 return '';
72 }
73
74 include_once './Modules/Group/classes/class.ilGroupXMLWriter.php';
75 $this->writer = new ilGroupXMLWriter($group);
76 $this->writer->setMode(ilGroupXMLWriter::MODE_EXPORT);
77 $this->writer->start();
78 return $this->writer->getXML();
79 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Class ilObjGroup.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getAllReferences($a_id)
get all reference ids of object

References $GLOBALS, ilObject\_getAllReferences(), ilObjectFactory\getInstanceByRefId(), and ilGroupXMLWriter\MODE_EXPORT.

+ Here is the call graph for this function:

◆ init()

ilGroupExporter::init ( )

Init export.

Returns

Reimplemented from ilXmlExporter.

Definition at line 32 of file class.ilGroupExporter.php.

33 {
34 }

Field Documentation

◆ $writer

ilGroupExporter::$writer = null
private

Definition at line 19 of file class.ilGroupExporter.php.


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