ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilWikiExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Export/classes/class.ilXmlExporter.php");
5 
14 {
15  private $ds;
16 
20  function init()
21  {
22  include_once("./Modules/Wiki/classes/class.ilWikiDataSet.php");
23  $this->ds = new ilWikiDataSet();
24  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
25  $this->ds->setDSPrefix("ds");
26  }
27 
28 
37  function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
38  {
39  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
40  include_once("./Services/COPage/classes/class.ilPageObject.php");
41  $pg_ids = array();
42  foreach ($a_ids as $id)
43  {
44  $pages = ilWikiPage::getAllPages($id);
45  foreach ($pages as $p)
46  {
47  if (ilPageObject::_exists("wpg", $p["id"]))
48  {
49  $pg_ids[] = "wpg:".$p["id"];
50  }
51  }
52  }
53 
54  return array (
55  array(
56  "component" => "Services/COPage",
57  "entity" => "pg",
58  "ids" => $pg_ids),
59  array(
60  "component" => "Services/Rating",
61  "entity" => "rating_category",
62  "ids" => $a_ids
63  )
64  );
65  }
66 
75  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
76  {
77  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
78  }
79 
87  function getValidSchemaVersions($a_entity)
88  {
89  return array (
90  "4.1.0" => array(
91  "namespace" => "http://www.ilias.de/Modules/Wiki/wiki/4_1",
92  "xsd_file" => "ilias_wiki_4_1.xsd",
93  "uses_dataset" => true,
94  "min" => "4.1.0",
95  "max" => "4.2.99"),
96  "4.3.0" => array(
97  "namespace" => "http://www.ilias.de/Modules/Wiki/wiki/4_3",
98  "xsd_file" => "ilias_wiki_4_3.xsd",
99  "uses_dataset" => true,
100  "min" => "4.3.0",
101  "max" => "")
102  );
103  }
104 
105 }
106 
107 ?>