ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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
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

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

101  : array {
102  return array(
103  "8.0" => array(
104  "namespace" => "https://www.ilias.de/Modules/Blog/8",
105  "xsd_file" => "ilias_blog_8.xsd",
106  "uses_dataset" => true,
107  "min" => "8.0",
108  "max" => ""
109  ),
110  "5.3.0" => array(
111  "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
112  "xsd_file" => "ilias_blog_5_0.xsd",
113  "uses_dataset" => true,
114  "min" => "5.3.0",
115  "max" => ""
116  ),
117  "5.0.0" => array(
118  "namespace" => "https://www.ilias.de/Modules/Blog/5_0",
119  "xsd_file" => "ilias_blog_5_0.xsd",
120  "uses_dataset" => true,
121  "min" => "5.0.0",
122  "max" => "5.2.99"
123  ),
124  "4.3.0" => array(
125  "namespace" => "https://www.ilias.de/Modules/Blog/4_3",
126  "xsd_file" => "ilias_blog_4_3.xsd",
127  "uses_dataset" => true,
128  "min" => "4.3.0",
129  "max" => "4.9.9"
130  )
131  );
132  }

◆ 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" => "Services/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)->getStyleId();
68  if ($style_id > 0) {
69  $style_ids[] = $style_id;
70  }
71  }
72  if (count($style_ids)) {
73  $res[] = array(
74  "component" => "Services/Style",
75  "entity" => "sty",
76  "ids" => $style_ids
77  );
78  }
79 
80  // service settings
81  $res[] = array(
82  "component" => "Services/Object",
83  "entity" => "common",
84  "ids" => $a_ids
85  );
86 
87  return $res;
88  }
$res
Definition: ltiservices.php:69
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 90 of file class.ilBlogExporter.php.

94  : string {
95  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
96  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
97  }

◆ 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: feed.php:28

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: