ILIAS  release_4-4 Revision
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...
 
 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
 

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

105  {
106  return array (
107  "4.1.0" => array(
108  "namespace" => "http://www.ilias.de/Modules/Group/grp/4_1",
109  "xsd_file" => "ilias_grp_4_1.xsd",
110  "uses_dataset" => false,
111  "min" => "4.1.0",
112  "max" => "")
113  );
114  }

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

References $GLOBALS, ilExportOptions\getInstance(), and ilExportOptions\KEY_ROOT.

46  {
47  include_once './Services/Export/classes/class.ilExportOptions.php';
49 
50  $obj_id = end($a_ids);
51 
52 
53  $GLOBALS['ilLog']->write(__METHOD__.': '.$obj_id);
54  if($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id)
55  {
56  return array();
57  }
58  if(count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1)
59  {
60  return array(
61  array(
62  'component' => 'Services/Container',
63  'entity' => 'struct',
64  'ids' => $a_ids
65  )
66  );
67  }
68  return array();
69  }
static getInstance()
Get singelton instance.
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:

◆ 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 79 of file class.ilGroupExporter.php.

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

80  {
81  $group_ref_id = end(ilObject::_getAllReferences($a_id));
82  $group = ilObjectFactory::getInstanceByRefId($group_ref_id,false);
83 
84  if(!$group instanceof ilObjGroup)
85  {
86  $GLOBALS['ilLog']->write(__METHOD__. $a_id . ' is not instance of type group');
87  return '';
88  }
89 
90  include_once './Modules/Group/classes/class.ilGroupXMLWriter.php';
91  $this->writer = new ilGroupXMLWriter($group);
92  $this->writer->setMode(ilGroupXMLWriter::MODE_EXPORT);
93  $this->writer->start();
94  return $this->writer->getXML();
95  }
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
$GLOBALS['ct_recipient']
XML writer class.
Class ilObjGroup.
+ 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: