ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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) {
32 $pg_ids[] = "prtt:" . $p["id"];
33 }
34 }
35
36 $deps[] =
37 array(
38 "component" => "Services/COPage",
39 "entity" => "pg",
40 "ids" => $pg_ids);
41
42 // style
43 $obj_ids = (is_array($a_ids))
44 ? $a_ids
45 : array($a_ids);
46 $deps[] = array(
47 "component" => "Services/Style",
48 "entity" => "object_style",
49 "ids" => $obj_ids
50 );
51
52 return $deps;
53 }
54
55 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
56 {
57 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
58 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
59 }
60
61 public function getValidSchemaVersions($a_entity)
62 {
63 return array(
64 "4.4.0" => array(
65 "namespace" => "http://www.ilias.de/Modules/Portfolio/4_4",
66 "xsd_file" => "ilias_portfolio_4_4.xsd",
67 "uses_dataset" => true,
68 "min" => "4.4.0",
69 "max" => "4.9.9"),
70 "5.0.0" => array(
71 "namespace" => "http://www.ilias.de/Modules/Portfolio/5_0",
72 "xsd_file" => "ilias_portfolio_5_0.xsd",
73 "uses_dataset" => true,
74 "min" => "5.0.0",
75 "max" => "")
76 );
77 }
78}
An exception for terminatinating execution or to throw for unit testing.
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 getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
Xml Exporter class.
if(!array_key_exists('StateId', $_REQUEST)) $id