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

Exporter class for sessions. More...

+ Inheritance diagram for ilForumExporter:
+ Collaboration diagram for ilForumExporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 
 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

 $ds
 

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

Exporter class for sessions.

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

Definition at line 11 of file class.ilForumExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilForumExporter::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 79 of file class.ilForumExporter.php.

80  {
81  return array(
82  "4.1.0" => array(
83  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_1",
84  "xsd_file" => "ilias_frm_4_1.xsd",
85  "uses_dataset" => false,
86  "min" => "4.1.0",
87  "max" => "4.4.999"
88  ),
89  "4.5.0" => array(
90  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_5",
91  "xsd_file" => "ilias_frm_4_5.xsd",
92  "uses_dataset" => false,
93  "min" => "4.5.0",
94  "max" => "5.0.999"
95  ),
96  "5.1.0" => array(
97  "namespace" => "http://www.ilias.de/Modules/Forum/frm/5_1",
98  "xsd_file" => "ilias_frm_5_1.xsd",
99  "uses_dataset" => false,
100  "min" => "5.1.0",
101  "max" => ""
102  )
103  );
104  }

◆ getXmlExportTailDependencies()

ilForumExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Definition at line 50 of file class.ilForumExporter.php.

51  {
52  $deps = [];
53 
54  if ('frm' === $a_entity) {
55  $deps[] = [
56  'component' => 'Services/Object',
57  'entity' => 'common',
58  'ids' => $a_ids
59  ];
60 
61  // news settings
62  $deps[] = [
63  "component" => "Services/News",
64  "entity" => "news_settings",
65  "ids" => $a_ids
66  ];
67  }
68 
69  return $deps;
70  }

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

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

References $xml, ilObject\_lookupType(), ilXmlExporter\getAbsoluteExportDirectory(), ilXmlExporter\getRelativeExportDirectory(), and ilUtil\makeDirParents().

32  {
33  $xml = '';
34 
35  if (ilObject::_lookupType($a_id) == 'frm') {
36  $writer = new ilForumXMLWriter();
37  $writer->setForumId($a_id);
39  $writer->setFileTargetDirectories($this->getRelativeExportDirectory(), $this->getAbsoluteExportDirectory());
40  $writer->start();
41  $xml .= $writer->getXml();
42  }
43 
44  return $xml;
45  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getRelativeExportDirectory()
Get relative export directory.
XML writer class.
getAbsoluteExportDirectory()
Get absolute export directory.
$xml
Definition: metadata.php:332
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:

◆ init()

ilForumExporter::init ( )

Initialisation.

Definition at line 18 of file class.ilForumExporter.php.

19  {
20  }

Field Documentation

◆ $ds

ilForumExporter::$ds
private

Definition at line 13 of file class.ilForumExporter.php.


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