ILIAS  release_8 Revision v8.23
ilBlogImporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 24 of file class.ilBlogImporter.php.

Member Function Documentation

◆ finalProcessing()

ilBlogImporter::finalProcessing ( ilImportMapping  $a_mapping)

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

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

61  : void {
62  $blp_map = $a_mapping->getMappingsOfEntity("Services/COPage", "pg");
63  foreach ($blp_map as $blp_id) {
64  $blp_id = (int) substr($blp_id, 4);
65  $blog_id = ilBlogPosting::lookupBlogId($blp_id);
66  ilBlogPosting::_writeParentId("blp", $blp_id, (int) $blog_id);
67  }
68 
69  $sty_map = $a_mapping->getMappingsOfEntity("Services/Style", "sty");
70  foreach ($sty_map as $old_sty_id => $new_sty_id) {
71  if (is_array(ilBlogDataSet::$style_map[$old_sty_id])) {
72  foreach (ilBlogDataSet::$style_map[$old_sty_id] as $blog_id) {
73  $this->content_style_domain
74  ->styleForObjId($blog_id)
75  ->updateStyleId($new_sty_id);
76  }
77  }
78  }
79  }
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 43 of file class.ilBlogImporter.php.

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

48  : void {
49  $this->ds->setImportDirectory($this->getImportDirectory());
50  $parser = new ilDataSetImportParser(
51  $a_entity,
52  $this->getSchemaVersion(),
53  $a_xml,
54  $this->ds,
55  $a_mapping
56  );
57  }
Manifest parser for ILIAS standard export files.
+ Here is the call graph for this function:

◆ init()

ilBlogImporter::init ( )

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

References $DIC, and ilXmlImporter\getImport().

29  : void
30  {
31  global $DIC;
32 
33  $this->ds = new ilBlogDataSet();
34  $this->ds->setDSPrefix("ds");
35  $this->content_style_domain = $DIC
36  ->contentStyle()
37  ->domain();
38 
39  $cop_config = $this->getImport()->getConfig("Services/COPage");
40  $cop_config->setUpdateIfExists(true);
41  }
Blog Data set class This class implements the following entities:
global $DIC
Definition: feed.php:28
+ 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 27 of file class.ilBlogImporter.php.

◆ $ds

ilBlogDataSet ilBlogImporter::$ds
protected

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


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