ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
class.ilBlogExporter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 protected \ILIAS\Blog\Posting\PostingManager $posting_manager;
28 protected ilBlogDataSet $ds;
29 protected \ILIAS\Style\Content\DomainService $content_style_domain;
30
31 public function __construct()
32 {
33 global $DIC;
35 $blog_service = $DIC->blog()->internal();
36
37 $this->content_style_domain = $DIC
38 ->contentStyle()
39 ->domain();
40 $this->posting_manager = $blog_service->domain()->posting();
41 }
42
43
44 public function init(): void
45 {
46 $this->ds = new ilBlogDataSet();
47 $this->ds->setDSPrefix("ds");
48 }
49
51 string $a_entity,
52 string $a_target_release,
53 array $a_ids
54 ): array {
55 $res = array();
56
57 // postings
58 $pg_ids = array();
59 foreach ($a_ids as $id) {
60 $posting_ids = $this->posting_manager->getAllPostingIds((int) $id);
61 foreach ($posting_ids as $p) {
62 $pg_ids[] = "blp:" . $p;
63 }
64 }
65 if (count($pg_ids)) {
66 $res[] = array(
67 "component" => "components/ILIAS/COPage",
68 "entity" => "pg",
69 "ids" => $pg_ids
70 );
71 }
72
73 // style
74 $style_ids = array();
75 foreach ($a_ids as $id) {
76 $style_id = $this->content_style_domain->styleForObjId((int) $id)->getExportStyleId();
77 if ($style_id > 0) {
78 $style_ids[] = $style_id;
79 }
80 }
81 if (count($style_ids)) {
82 $res[] = array(
83 "component" => "components/ILIAS/Style",
84 "entity" => "sty",
85 "ids" => $style_ids
86 );
87 }
88
89 // service settings
90 $res[] = array(
91 "component" => "components/ILIAS/ILIASObject",
92 "entity" => "common",
93 "ids" => $a_ids
94 );
95
96 $md_ids = [];
97 foreach ($a_ids as $id) {
98 $md_ids[] = $id . ':0:blog';
99 }
100 if (!empty($md_ids)) {
101 $res[] = [
102 'component' => 'components/ILIAS/MetaData',
103 'entity' => 'md',
104 'ids' => $md_ids,
105 ];
106 }
107
108 return $res;
109 }
110
111 public function getXmlRepresentation(
112 string $a_entity,
113 string $a_schema_version,
114 string $a_id
115 ): string {
116 $this->ds->initByExporter($this);
117 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
118 }
119
120 public function getValidSchemaVersions(
121 string $a_entity
122 ): array {
123 return array(
124 "8.0" => array(
125 "namespace" => "https://www.ilias.de/Modules/Blog/8",
126 "xsd_file" => "ilias_blog_8.xsd",
127 "uses_dataset" => true,
128 "min" => "8.0",
129 "max" => ""
130 ),
131 "5.3.0" => array(
132 "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
133 "xsd_file" => "ilias_blog_5_0.xsd",
134 "uses_dataset" => true,
135 "min" => "5.3.0",
136 "max" => ""
137 ),
138 "5.0.0" => array(
139 "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
140 "xsd_file" => "ilias_blog_5_0.xsd",
141 "uses_dataset" => true,
142 "min" => "5.0.0",
143 "max" => "5.2.99"
144 ),
145 "4.3.0" => array(
146 "namespace" => "https://www.ilias.de/Modules/Blog/4_3",
147 "xsd_file" => "ilias_blog_4_3.xsd",
148 "uses_dataset" => true,
149 "min" => "4.3.0",
150 "max" => "4.9.9"
151 )
152 );
153 }
154}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Blog Data set class This class implements the following entities:
Blog export definition.
ILIAS Blog Posting PostingManager $posting_manager
ILIAS Style Content DomainService $content_style_domain
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
Xml Exporter class.
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'vtt', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
foreach($_POST as $key=> $value) $res
global $DIC
Definition: shib_login.php:26