ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilBlogImporter Class Reference

Importer class for blog. More...

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

Public Member Functions

 init ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
 finalProcessing (ilImportMapping $a_mapping)
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 
 setImport (ilImport $a_val)
 
 getImport ()
 
 init ()
 
 setInstallId (string $a_val)
 
 getInstallId ()
 
 setInstallUrl (string $a_val)
 
 getInstallUrl ()
 
 setSchemaVersion (string $a_val)
 
 getSchemaVersion ()
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setSkipEntities (array $a_val)
 
 getSkipEntities ()
 
 exportedFromSameInstallation ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
 finalProcessing (ilImportMapping $a_mapping)
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 

Protected Attributes

ilBlogDataSet $ds
 
ILIAS Style Content DomainService $content_style_domain
 
- Protected Attributes inherited from ilXmlImporter
array $skip_entities = array()
 
ilImport $imp
 
string $install_id
 
string $install_url
 
string $schema_version
 
string $import_directory
 

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

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

Member Function Documentation

◆ finalProcessing()

ilBlogImporter::finalProcessing ( ilImportMapping  $a_mapping)

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

References ilBlogDataSet\$style_map, ilPageObject\_writeParentId(), ilImportMapping\getMappingsOfEntity(), ILIAS\Repository\int(), and ilBlogPosting\lookupBlogId().

63  : void {
64  $blp_map = $a_mapping->getMappingsOfEntity("components/ILIAS/COPage", "pg");
65  foreach ($blp_map as $blp_id) {
66  $blp_id = (int) substr($blp_id, 4);
67  $blog_id = ilBlogPosting::lookupBlogId($blp_id);
68  ilBlogPosting::_writeParentId("blp", $blp_id, (int) $blog_id);
69  }
70 
71  $sty_map = $a_mapping->getMappingsOfEntity("components/ILIAS/Style", "sty");
72  foreach ($sty_map as $old_sty_id => $new_sty_id) {
73  if (is_array(ilBlogDataSet::$style_map[$old_sty_id])) {
74  foreach (ilBlogDataSet::$style_map[$old_sty_id] as $blog_id) {
75  $this->content_style_domain
76  ->styleForObjId($blog_id)
77  ->updateStyleId($new_sty_id);
78  }
79  }
80  }
81  }
static array $style_map
static _writeParentId(string $a_parent_type, int $a_pg_id, int $a_par_id)
getMappingsOfEntity(string $a_comp, string $a_entity)
static lookupBlogId(int $a_posting_id)
+ Here is the call graph for this function:

◆ importXmlRepresentation()

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

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

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

50  : void {
51  $this->ds->setImportDirectory($this->getImportDirectory());
52  $parser = new ilDataSetImportParser(
53  $a_entity,
54  $this->getSchemaVersion(),
55  $a_xml,
56  $this->ds,
57  $a_mapping
58  );
59  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ init()

ilBlogImporter::init ( )

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

References $DIC, and ilXmlImporter\getImport().

31  : void
32  {
33  global $DIC;
34 
35  $this->ds = new ilBlogDataSet();
36  $this->ds->setDSPrefix("ds");
37  $this->content_style_domain = $DIC
38  ->contentStyle()
39  ->domain();
40 
41  $cop_config = $this->getImport()->getConfig("components/ILIAS/COPage");
42  $cop_config->setUpdateIfExists(true);
43  }
Blog Data set class This class implements the following entities:
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content DomainService ilBlogImporter::$content_style_domain
protected

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

◆ $ds

ilBlogDataSet ilBlogImporter::$ds
protected

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


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