ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilBlogExporter.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 
15 {
16  protected $ds;
17 
18  public function init()
19  {
20  include_once("./Modules/Blog/classes/class.ilBlogDataSet.php");
21  $this->ds = new ilBlogDataSet();
22  $this->ds->setDSPrefix("ds");
23  }
24 
25  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
26  {
27  include_once("./Modules/Blog/classes/class.ilBlogPosting.php");
28  $pg_ids = array();
29  foreach ($a_ids as $id)
30  {
31  $pages = ilBlogPosting::getAllPostings($id);
32  foreach (array_keys($pages) as $p)
33  {
34  $pg_ids[] = "blp:".$p;
35  }
36  }
37 
38  return array (
39  array(
40  "component" => "Services/COPage",
41  "entity" => "pg",
42  "ids" => $pg_ids)
43  );
44  }
45 
46  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
47  {
48  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
49  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
50  }
51 
52  public function getValidSchemaVersions($a_entity)
53  {
54  return array (
55  "4.3.0" => array(
56  "namespace" => "http://www.ilias.de/Services/Modules/Blog/4_3",
57  "xsd_file" => "ilias_blog_4_3.xsd",
58  "uses_dataset" => true,
59  "min" => "4.3.0",
60  "max" => "")
61  );
62  }
63 
64 }
65 ?>