ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilBlogImporter Class Reference

Importer class for blog. More...

+ Inheritance diagram for ilBlogImporter:
+ Collaboration diagram for ilBlogImporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Protected Attributes

 $ds
 
- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 
 $imp
 

Detailed Description

Importer class for blog.

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

Definition at line 13 of file class.ilBlogImporter.php.

Member Function Documentation

◆ finalProcessing()

ilBlogImporter::finalProcessing (   $a_mapping)

Final processing.

Parameters
arraymapping array

Definition at line 51 of file class.ilBlogImporter.php.

References ilBlogDataSet\$style_map, ilPageObject\_writeParentId(), ilBlogPosting\lookupBlogId(), and ilObjStyleSheet\writeStyleUsage().

52  {
53  include_once("./Modules/Blog/classes/class.ilBlogPosting.php");
54  $blp_map = $a_mapping->getMappingsOfEntity("Services/COPage", "pg");
55  foreach ($blp_map as $blp_id) {
56  $blp_id = substr($blp_id, 4);
57  $blog_id = ilBlogPosting::lookupBlogId($blp_id);
58  ilBlogPosting::_writeParentId("blp", $blp_id, $blog_id);
59  }
60 
61  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
62  $sty_map = $a_mapping->getMappingsOfEntity("Services/Style", "sty");
63  foreach ($sty_map as $old_sty_id => $new_sty_id) {
64  if (is_array(ilBlogDataSet::$style_map[$old_sty_id])) {
65  foreach (ilBlogDataSet::$style_map[$old_sty_id] as $blog_id) {
66  ilObjStyleSheet::writeStyleUsage($blog_id, $new_sty_id);
67  }
68  }
69  }
70  }
static lookupBlogId($a_posting_id)
Lookup blog id.
static writeStyleUsage($a_obj_id, $a_style_id)
Write style usage.
static _writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
+ Here is the call graph for this function:

◆ importXmlRepresentation()

ilBlogImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Import XML.

Parameters

Definition at line 33 of file class.ilBlogImporter.php.

References $parser, ilXmlImporter\getImportDirectory(), and ilXmlImporter\getSchemaVersion().

34  {
35  $this->ds->setImportDirectory($this->getImportDirectory());
36  include_once("./Services/DataSet/classes/class.ilDataSetImportParser.php");
38  $a_entity,
39  $this->getSchemaVersion(),
40  $a_xml,
41  $this->ds,
42  $a_mapping
43  );
44  }
getSchemaVersion()
Get schema version.
getImportDirectory()
Get import directory.
Manifest parser for ILIAS standard export files.
$parser
Definition: BPMN2Parser.php:23
+ Here is the call graph for this function:

◆ init()

ilBlogImporter::init ( )

Initialisation.

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

21  {
22  include_once("./Modules/Blog/classes/class.ilBlogDataSet.php");
23  $this->ds = new ilBlogDataSet();
24  $this->ds->setDSPrefix("ds");
25  }
Blog Data set class.

Field Documentation

◆ $ds

ilBlogImporter::$ds
protected

Definition at line 15 of file class.ilBlogImporter.php.


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