ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilBlogExporter.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
11{
12 protected $ds;
13
14 public function init()
15 {
16 $this->ds = new ilBlogDataSet();
17 $this->ds->setDSPrefix("ds");
18 }
19
20 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
21 {
22 $res = array();
23
24 // postings
25 $pg_ids = array();
26 foreach ($a_ids as $id) {
28 foreach (array_keys($pages) as $p) {
29 $pg_ids[] = "blp:" . $p;
30 }
31 }
32 if (sizeof($pg_ids)) {
33 $res[] = array(
34 "component" => "Services/COPage",
35 "entity" => "pg",
36 "ids" => $pg_ids
37 );
38 }
39
40 // style
41 $style_ids = array();
42 foreach ($a_ids as $id) {
44 if ($style_id > 0) {
45 $style_ids[] = $style_id;
46 }
47 }
48 if (sizeof($style_ids)) {
49 $res[] = array(
50 "component" => "Services/Style",
51 "entity" => "sty",
52 "ids" => $style_ids
53 );
54 }
55
56 // service settings
57 $res[] = array(
58 "component" => "Services/Object",
59 "entity" => "common",
60 "ids" => $a_ids);
61
62 return $res;
63 }
64
65 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
66 {
67 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
68 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
69 }
70
71 public function getValidSchemaVersions($a_entity)
72 {
73 return array(
74 "4.3.0" => array(
75 "namespace" => "http://www.ilias.de/Modules/Blog/4_3",
76 "xsd_file" => "ilias_blog_4_3.xsd",
77 "uses_dataset" => true,
78 "min" => "4.3.0",
79 "max" => "4.9.9"),
80 "5.0.0" => array(
81 "namespace" => "http://www.ilias.de/Modules/Blog/5_0",
82 "xsd_file" => "ilias_blog_5_0.xsd",
83 "uses_dataset" => true,
84 "min" => "5.0.0",
85 "max" => "")
86
87 );
88 }
89}
An exception for terminatinating execution or to throw for unit testing.
Blog Data set class.
Blog export definition.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
static lookupObjectStyle($a_obj_id)
Lookup object style.
Xml Exporter class.
foreach($_POST as $key=> $value) $res