ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilPortfolioExporter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
13{
14 protected $ds;
15
16 public function init()
17 {
18 $this->ds = new ilPortfolioDataSet();
19 $this->ds->setDSPrefix("ds");
20 }
21
22 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
23 {
24 $pg_ids = array();
25 foreach ($a_ids as $id) {
27 $pg_ids[] = "prtt:" . $p["id"];
28 }
29 }
30
31 $deps[] =
32 array(
33 "component" => "Services/COPage",
34 "entity" => "pg",
35 "ids" => $pg_ids);
36
37 // style
38 $obj_ids = (is_array($a_ids))
39 ? $a_ids
40 : array($a_ids);
41 $deps[] = array(
42 "component" => "Services/Style",
43 "entity" => "object_style",
44 "ids" => $obj_ids
45 );
46
47 return $deps;
48 }
49
50 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
51 {
52 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
53 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
54 }
55
56 public function getValidSchemaVersions($a_entity)
57 {
58 return array(
59 "4.4.0" => array(
60 "namespace" => "http://www.ilias.de/Modules/Portfolio/4_4",
61 "xsd_file" => "ilias_portfolio_4_4.xsd",
62 "uses_dataset" => true,
63 "min" => "4.4.0",
64 "max" => "4.9.9"),
65 "5.0.0" => array(
66 "namespace" => "http://www.ilias.de/Modules/Portfolio/5_0",
67 "xsd_file" => "ilias_portfolio_5_0.xsd",
68 "uses_dataset" => true,
69 "min" => "5.0.0",
70 "max" => "")
71 );
72 }
73}
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.