ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules 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  $pg_ids = array();
41  foreach ($a_ids as $id)
42  {
43  $pages = ilWikiPage::getAllPages($id);
44  foreach ($pages as $p)
45  {
46  if (ilWikiPage::_exists("wpg", $p["id"]))
47  {
48  $pg_ids[] = "wpg:".$p["id"];
49  }
50  }
51  }
52 
53  return array (
54  array(
55  "component" => "Services/COPage",
56  "entity" => "pg",
57  "ids" => $pg_ids),
58  array(
59  "component" => "Services/Rating",
60  "entity" => "rating_category",
61  "ids" => $a_ids
62  )
63  );
64  }
65 
74  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
75  {
76  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
77  }
78 
86  function getValidSchemaVersions($a_entity)
87  {
88  return array (
89  "4.1.0" => array(
90  "namespace" => "http://www.ilias.de/Modules/Wiki/wiki/4_1",
91  "xsd_file" => "ilias_wiki_4_1.xsd",
92  "uses_dataset" => true,
93  "min" => "4.1.0",
94  "max" => "4.2.99"),
95  "4.3.0" => array(
96  "namespace" => "http://www.ilias.de/Modules/Wiki/wiki/4_3",
97  "xsd_file" => "ilias_wiki_4_3.xsd",
98  "uses_dataset" => true,
99  "min" => "4.3.0",
100  "max" => "")
101  );
102  }
103 
104 }
105 
106 ?>
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
Xml Exporter class.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
Exporter class for wikis.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
Wiki Data set class.
init()
Initialisation.
static getAllPages($a_wiki_id)
Get all pages of wiki.