ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
47  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
48  {
49  $res = [];
50 
51  if ($a_entity == "frm") {
52  // service settings
53  $res[] = array(
54  "component" => "Services/Object",
55  "entity" => "common",
56  "ids" => $a_ids
57  );
58  }
59 
60  // news settings
61  $res[] = [
62  "component" => "Services/News",
63  "entity" => "news_settings",
64  "ids" => $a_ids
65  ];
66 
67  return $res;
68  }
69 
77  public function getValidSchemaVersions($a_entity)
78  {
79  return array(
80  "4.1.0" => array(
81  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_1",
82  "xsd_file" => "ilias_frm_4_1.xsd",
83  "uses_dataset" => false,
84  "min" => "4.1.0",
85  "max" => "4.4.999"
86  ),
87  "4.5.0" => array(
88  "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_5",
89  "xsd_file" => "ilias_frm_4_5.xsd",
90  "uses_dataset" => false,
91  "min" => "4.5.0",
92  "max" => "5.0.999"
93  ),
94  "5.1.0" => array(
95  "namespace" => "http://www.ilias.de/Modules/Forum/frm/5_1",
96  "xsd_file" => "ilias_frm_5_1.xsd",
97  "uses_dataset" => false,
98  "min" => "5.1.0",
99  "max" => ""
100  )
101  );
102  }
103 }
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.
foreach($_POST as $key=> $value) $res
init()
Initialisation.
getAbsoluteExportDirectory()
Get absolute export directory.
static _lookupType($a_id, $a_reference=false)
lookup object type
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.