ILIAS  release_4-4 Revision
ilWikiExporter Class Reference

Exporter class for wikis. More...

+ Inheritance diagram for ilWikiExporter:
+ Collaboration diagram for ilWikiExporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. 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
 

Detailed Description

Exporter class for wikis.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id

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

Member Function Documentation

◆ getValidSchemaVersions()

ilWikiExporter::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 86 of file class.ilWikiExporter.php.

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  }

◆ getXmlExportTailDependencies()

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

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Definition at line 37 of file class.ilWikiExporter.php.

References ilPageObject\_exists(), and ilWikiPage\getAllPages().

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  }
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
static getAllPages($a_wiki_id)
Get all pages of wiki.
+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Definition at line 74 of file class.ilWikiExporter.php.

75  {
76  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
77  }

◆ init()

ilWikiExporter::init ( )

Initialisation.

Definition at line 20 of file class.ilWikiExporter.php.

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  }
Wiki Data set class.

Field Documentation

◆ $ds

ilWikiExporter::$ds
private

Definition at line 15 of file class.ilWikiExporter.php.


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