ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBlogExporter Class Reference

Blog export definition. More...

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

Public Member Functions

 init ()
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 
- 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
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

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 25 of file class.ilBlogExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilBlogExporter::getValidSchemaVersions ( string  $a_entity)

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

113  : array {
114  return array(
115  "8.0" => array(
116  "namespace" => "https://www.ilias.de/Modules/Blog/8",
117  "xsd_file" => "ilias_blog_8.xsd",
118  "uses_dataset" => true,
119  "min" => "8.0",
120  "max" => ""
121  ),
122  "5.3.0" => array(
123  "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
124  "xsd_file" => "ilias_blog_5_0.xsd",
125  "uses_dataset" => true,
126  "min" => "5.3.0",
127  "max" => ""
128  ),
129  "5.0.0" => array(
130  "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
131  "xsd_file" => "ilias_blog_5_0.xsd",
132  "uses_dataset" => true,
133  "min" => "5.0.0",
134  "max" => "5.2.99"
135  ),
136  "4.3.0" => array(
137  "namespace" => "https://www.ilias.de/Modules/Blog/4_3",
138  "xsd_file" => "ilias_blog_4_3.xsd",
139  "uses_dataset" => true,
140  "min" => "4.3.0",
141  "max" => "4.9.9"
142  )
143  );
144  }

◆ getXmlExportTailDependencies()

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

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

References $id, $res, and ilBlogPosting\getAllPostings().

45  : array {
46  $res = array();
47 
48  // postings
49  $pg_ids = array();
50  foreach ($a_ids as $id) {
51  $pages = ilBlogPosting::getAllPostings($id);
52  foreach (array_keys($pages) as $p) {
53  $pg_ids[] = "blp:" . $p;
54  }
55  }
56  if (count($pg_ids)) {
57  $res[] = array(
58  "component" => "components/ILIAS/COPage",
59  "entity" => "pg",
60  "ids" => $pg_ids
61  );
62  }
63 
64  // style
65  $style_ids = array();
66  foreach ($a_ids as $id) {
67  $style_id = $this->content_style_domain->styleForObjId((int) $id)->getExportStyleId();
68  if ($style_id > 0) {
69  $style_ids[] = $style_id;
70  }
71  }
72  if (count($style_ids)) {
73  $res[] = array(
74  "component" => "components/ILIAS/Style",
75  "entity" => "sty",
76  "ids" => $style_ids
77  );
78  }
79 
80  // service settings
81  $res[] = array(
82  "component" => "components/ILIAS/ILIASObject",
83  "entity" => "common",
84  "ids" => $a_ids
85  );
86 
87  $md_ids = [];
88  foreach ($a_ids as $id) {
89  $md_ids[] = $id . ':0:blog';
90  }
91  if (!empty($md_ids)) {
92  $res[] = [
93  'component' => 'components/ILIAS/MetaData',
94  'entity' => 'md',
95  'ids' => $md_ids,
96  ];
97  }
98 
99  return $res;
100  }
$res
Definition: ltiservices.php:66
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

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

106  : string {
107  $this->ds->initByExporter($this);
108  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
109  }

◆ init()

ilBlogExporter::init ( )

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

References $DIC.

30  : void
31  {
32  global $DIC;
33 
34  $this->ds = new ilBlogDataSet();
35  $this->ds->setDSPrefix("ds");
36  $this->content_style_domain = $DIC
37  ->contentStyle()
38  ->domain();
39  }
Blog Data set class This class implements the following entities:
global $DIC
Definition: shib_login.php:22

Field Documentation

◆ $content_style_domain

ILIAS Style Content DomainService ilBlogExporter::$content_style_domain
protected

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

◆ $ds

ilBlogDataSet ilBlogExporter::$ds
protected

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


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