ILIAS  release_7 Revision v7.30-3-g800a261c036
ilBlogExporter Class Reference

Blog export definition. More...

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

Public Member Functions

 init ()
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Protected Attributes

 $ds
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 

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

Member Function Documentation

◆ getValidSchemaVersions()

ilBlogExporter::getValidSchemaVersions (   $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" => "")
    );
Returns
array

Reimplemented from ilXmlExporter.

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

72 {
73 return array(
74 "4.3.0" => array(
75 "namespace" => "http://www.ilias.de/Modules/Blog/4_3",
76 "xsd_file" => "ilias_blog_4_3.xsd",
77 "uses_dataset" => true,
78 "min" => "4.3.0",
79 "max" => "4.9.9"),
80 "5.0.0" => array(
81 "namespace" => "http://www.ilias.de/Modules/Blog/5_0",
82 "xsd_file" => "ilias_blog_5_0.xsd",
83 "uses_dataset" => true,
84 "min" => "5.0.0",
85 "max" => "")
86
87 );
88 }

◆ getXmlExportTailDependencies()

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

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

21 {
22 $res = array();
23
24 // postings
25 $pg_ids = array();
26 foreach ($a_ids as $id) {
28 foreach (array_keys($pages) as $p) {
29 $pg_ids[] = "blp:" . $p;
30 }
31 }
32 if (sizeof($pg_ids)) {
33 $res[] = array(
34 "component" => "Services/COPage",
35 "entity" => "pg",
36 "ids" => $pg_ids
37 );
38 }
39
40 // style
41 $style_ids = array();
42 foreach ($a_ids as $id) {
44 if ($style_id > 0) {
45 $style_ids[] = $style_id;
46 }
47 }
48 if (sizeof($style_ids)) {
49 $res[] = array(
50 "component" => "Services/Style",
51 "entity" => "sty",
52 "ids" => $style_ids
53 );
54 }
55
56 // service settings
57 $res[] = array(
58 "component" => "Services/Object",
59 "entity" => "common",
60 "ids" => $a_ids);
61
62 return $res;
63 }
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
static lookupObjectStyle($a_obj_id)
Lookup object style.
foreach($_POST as $key=> $value) $res

References $res, ilBlogPosting\getAllPostings(), and ilObjStyleSheet\lookupObjectStyle().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringschema version
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

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

66 {
67 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
68 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
69 }

◆ init()

ilBlogExporter::init ( )

Reimplemented from ilXmlExporter.

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

15 {
16 $this->ds = new ilBlogDataSet();
17 $this->ds->setDSPrefix("ds");
18 }
Blog Data set class.

Field Documentation

◆ $ds

ilBlogExporter::$ds
protected

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


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