ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilForumExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
12 {
13  private $ds;
14 
18  public function init()
19  {
20  }
21 
22 
31  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
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  }
46 
50  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
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  }
71 
79  public function getValidSchemaVersions($a_entity)
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  }
105 }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getRelativeExportDirectory()
Get relative export directory.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Xml Exporter class.
XML writer class.
Exporter class for sessions.
init()
Initialisation.
getAbsoluteExportDirectory()
Get absolute export directory.
$xml
Definition: metadata.php:332
static _lookupType($a_id, $a_reference=false)
lookup object type
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.