ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilPortfolioExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once './Services/Export/classes/class.ilXmlExporter.php';
5
16{
17 protected $ds;
18
19 public function init()
20 {
21 include_once("./Modules/Portfolio/classes/class.ilPortfolioDataSet.php");
22 $this->ds = new ilPortfolioDataSet();
23 $this->ds->setDSPrefix("ds");
24 }
25
26 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
27 {
28 include_once("./Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php");
29 $pg_ids = array();
30 foreach ($a_ids as $id)
31 {
32 foreach(ilPortfolioTemplatePage::getAllPages($id) as $p)
33 {
34 $pg_ids[] = "prtt:".$p["id"];
35 }
36 }
37
38 $deps[] =
39 array(
40 "component" => "Services/COPage",
41 "entity" => "pg",
42 "ids" => $pg_ids);
43
44 // style
45 $obj_ids = (is_array($a_ids))
46 ? $a_ids
47 : array($a_ids);
48 $deps[] = array(
49 "component" => "Services/Style",
50 "entity" => "object_style",
51 "ids" => $obj_ids
52 );
53
54 return $deps;
55
56 }
57
58 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
59 {
60 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
61 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
62 }
63
64 public function getValidSchemaVersions($a_entity)
65 {
66 return array (
67 "4.4.0" => array(
68 "namespace" => "http://www.ilias.de/Modules/Portfolio/4_4",
69 "xsd_file" => "ilias_portfolio_4_4.xsd",
70 "uses_dataset" => true,
71 "min" => "4.4.0",
72 "max" => "4.9.9"),
73 "5.0.0" => array(
74 "namespace" => "http://www.ilias.de/Modules/Portfolio/5_0",
75 "xsd_file" => "ilias_portfolio_5_0.xsd",
76 "uses_dataset" => true,
77 "min" => "5.0.0",
78 "max" => "")
79 );
80 }
81}
82
83?>
Portfolio Data set class.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
static getAllPages($a_portfolio_id)
Get pages of portfolio.
Xml Exporter class.