ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilGroupExporter Class Reference

Folder export. More...

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

Public Member Functions

 __construct ()
 
 init ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Private Attributes

ilLogger $logger
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 
- Protected Attributes inherited from ilXmlExporter
string $dir_relative = ""
 
string $dir_absolute = ""
 
ilExport $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 ( )

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

References $DIC, and ILIAS\Repository\logger().

22  {
23  global $DIC;
24 
25  $this->logger = $DIC->logger()->grp();
26  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getValidSchemaVersions()

ilGroupExporter::getValidSchemaVersions ( string  $a_entity)

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

74  : array
75  {
76  return array(
77  "4.1.0" => array(
78  "namespace" => "http://www.ilias.de/Modules/Group/grp/4_1",
79  "xsd_file" => "ilias_grp_4_1.xsd",
80  "uses_dataset" => false,
81  "min" => "4.1.0",
82  "max" => "4.4.999"),
83  "5.0.0" => array(
84  "namespace" => "http://www.ilias.de/Modules/Group/grp/5_0",
85  "xsd_file" => "ilias_grp_5_0.xsd",
86  "uses_dataset" => false,
87  "min" => "5.0.0",
88  "max" => "")
89  );
90  }

◆ getXmlExportHeadDependencies()

ilGroupExporter::getXmlExportHeadDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

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

38  : array
39  {
40  // always trigger container because of co-page(s)
41  return array(
42  array(
43  'component' => 'Services/Container',
44  'entity' => 'struct',
45  'ids' => $a_ids
46  )
47  );
48  }

◆ getXmlRepresentation()

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

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

References ilObject\_getAllReferences(), ilObjectFactory\getInstanceByRefId(), ILIAS\Repository\logger(), and ilGroupXMLWriter\MODE_EXPORT.

54  : string
55  {
56  $refs = ilObject::_getAllReferences((int) $a_id);
57  $group_ref_id = end($refs);
58  $group = ilObjectFactory::getInstanceByRefId($group_ref_id, false);
59 
60  if (!$group instanceof ilObjGroup) {
61  $this->logger->warning($a_id . ' is not instance of type group');
62  return '';
63  }
64 
65  $writer = new ilGroupXMLWriter($group);
66  $writer->setMode(ilGroupXMLWriter::MODE_EXPORT);
67  $writer->start();
68  return $writer->getXML();
69  }
static _getAllReferences(int $id)
get all reference ids for object ID
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjGroup.
+ Here is the call graph for this function:

◆ init()

ilGroupExporter::init ( )

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

31  : void
32  {
33  }

Field Documentation

◆ $logger

ilLogger ilGroupExporter::$logger
private

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


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