ILIAS  release_8 Revision v8.24
ilBlogExporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilBlogExporter:
+ Collaboration diagram for ilBlogExporter:

Public Member Functions

 init ()
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Protected Attributes

ilBlogDataSet $ds
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilXmlExporter
string $dir_relative = ""
 
string $dir_absolute = ""
 
ilExport $exp
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Blog export definition

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 23 of file class.ilBlogExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilBlogExporter::getValidSchemaVersions ( string  $a_entity)

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example: return array ( "4.1.0" => array( "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1", "xsd_file" => "ilias_md_4_1.xsd", "min" => "4.1.0", "max" => "") );

Reimplemented from ilXmlExporter.

Definition at line 97 of file class.ilBlogExporter.php.

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 }

◆ getXmlExportTailDependencies()

ilBlogExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Get tail dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 39 of file class.ilBlogExporter.php.

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 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
$res
Definition: ltiservices.php:69

◆ getXmlRepresentation()

ilBlogExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)

Reimplemented from ilXmlExporter.

Definition at line 88 of file class.ilBlogExporter.php.

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 }

◆ init()

ilBlogExporter::init ( )

Reimplemented from ilXmlExporter.

Definition at line 28 of file class.ilBlogExporter.php.

28 : 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 }
Blog Data set class This class implements the following entities:
global $DIC
Definition: feed.php:28

References $DIC.

Field Documentation

◆ $content_style_domain

ILIAS Style Content DomainService ilBlogExporter::$content_style_domain
protected

Definition at line 26 of file class.ilBlogExporter.php.

◆ $ds

ilBlogDataSet ilBlogExporter::$ds
protected

Definition at line 25 of file class.ilBlogExporter.php.


The documentation for this class was generated from the following file: