ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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.

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

25  {
26 
27  }

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

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

116  {
117  return array (
118  "4.1.0" => array(
119  "namespace" => "http://www.ilias.de/Modules/Group/grp/4_1",
120  "xsd_file" => "ilias_grp_4_1.xsd",
121  "uses_dataset" => false,
122  "min" => "4.1.0",
123  "max" => "4.4.999"),
124  "5.0.0" => array(
125  "namespace" => "http://www.ilias.de/Modules/Group/grp/5_0",
126  "xsd_file" => "ilias_grp_5_0.xsd",
127  "uses_dataset" => false,
128  "min" => "5.0.0",
129  "max" => "")
130  );
131  }

◆ 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"

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

46  {
47  // always trigger container because of co-page(s)
48  return array(
49  array(
50  'component' => 'Services/Container',
51  'entity' => 'struct',
52  'ids' => $a_ids
53  )
54  );
55 
56  /*
57  include_once './Services/Export/classes/class.ilExportOptions.php';
58  $eo = ilExportOptions::getInstance();
59 
60  $obj_id = end($a_ids);
61 
62 
63  $GLOBALS['ilLog']->write(__METHOD__.': '.$obj_id);
64  if($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id)
65  {
66  return array();
67  }
68  if(count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1)
69  {
70  return array(
71  array(
72  'component' => 'Services/Container',
73  'entity' => 'struct',
74  'ids' => $a_ids
75  )
76  );
77  }
78  return array();
79  */
80  }

◆ getXmlRepresentation()

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

Get xml.

Parameters
object$a_entity
object$a_schema_version
object$a_id
Returns

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

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

91  {
92  $group_ref_id = end(ilObject::_getAllReferences($a_id));
93  $group = ilObjectFactory::getInstanceByRefId($group_ref_id,false);
94 
95  if(!$group instanceof ilObjGroup)
96  {
97  $GLOBALS['ilLog']->write(__METHOD__. $a_id . ' is not instance of type group');
98  return '';
99  }
100 
101  include_once './Modules/Group/classes/class.ilGroupXMLWriter.php';
102  $this->writer = new ilGroupXMLWriter($group);
103  $this->writer->setMode(ilGroupXMLWriter::MODE_EXPORT);
104  $this->writer->start();
105  return $this->writer->getXML();
106  }
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
XML writer class.
Class ilObjGroup.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ Here is the call graph for this function:

◆ init()

ilGroupExporter::init ( )

Init export.

Returns

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

34  {
35  }

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: