ILIAS  release_8 Revision v8.24
class.ilBlogExporter.php
Go to the documentation of this file.
1<?php
2
24{
25 protected ilBlogDataSet $ds;
26 protected \ILIAS\Style\Content\DomainService $content_style_domain;
27
28 public function init(): void
29 {
30 global $DIC;
31
32 $this->ds = new ilBlogDataSet();
33 $this->ds->setDSPrefix("ds");
34 $this->content_style_domain = $DIC
35 ->contentStyle()
36 ->domain();
37 }
38
40 string $a_entity,
41 string $a_target_release,
42 array $a_ids
43 ): array {
44 $res = array();
45
46 // postings
47 $pg_ids = array();
48 foreach ($a_ids as $id) {
50 foreach (array_keys($pages) as $p) {
51 $pg_ids[] = "blp:" . $p;
52 }
53 }
54 if (count($pg_ids)) {
55 $res[] = array(
56 "component" => "Services/COPage",
57 "entity" => "pg",
58 "ids" => $pg_ids
59 );
60 }
61
62 // style
63 $style_ids = array();
64 foreach ($a_ids as $id) {
65 $style_id = $this->content_style_domain->styleForObjId((int) $id)->getStyleId();
66 if ($style_id > 0) {
67 $style_ids[] = $style_id;
68 }
69 }
70 if (count($style_ids)) {
71 $res[] = array(
72 "component" => "Services/Style",
73 "entity" => "sty",
74 "ids" => $style_ids
75 );
76 }
77
78 // service settings
79 $res[] = array(
80 "component" => "Services/Object",
81 "entity" => "common",
82 "ids" => $a_ids
83 );
84
85 return $res;
86 }
87
88 public function getXmlRepresentation(
89 string $a_entity,
90 string $a_schema_version,
91 string $a_id
92 ): string {
93 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
94 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
95 }
96
97 public function getValidSchemaVersions(
98 string $a_entity
99 ): array {
100 return array(
101 "5.3.0" => array(
102 "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
103 "xsd_file" => "ilias_blog_5_0.xsd",
104 "uses_dataset" => true,
105 "min" => "5.3.0",
106 "max" => ""
107 ),
108 "5.0.0" => array(
109 "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
110 "xsd_file" => "ilias_blog_5_0.xsd",
111 "uses_dataset" => true,
112 "min" => "5.0.0",
113 "max" => "5.2.99"
114 ),
115 "4.3.0" => array(
116 "namespace" => "https://www.ilias.de/Modules/Blog/4_3",
117 "xsd_file" => "ilias_blog_4_3.xsd",
118 "uses_dataset" => true,
119 "min" => "4.3.0",
120 "max" => "4.9.9"
121 )
122 );
123 }
124}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
return true
Blog Data set class This class implements the following entities:
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
global $DIC
Definition: feed.php:28
$res
Definition: ltiservices.php:69