ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPortfolioImporter.php
Go to the documentation of this file.
1<?php
2
25{
27
28 public function init(): void
29 {
30 $this->ds = new ilPortfolioDataSet();
31 $this->ds->setDSPrefix("ds");
32 }
33
34 public function importXmlRepresentation(
35 string $a_entity,
36 string $a_id,
37 string $a_xml,
38 ilImportMapping $a_mapping
39 ): void {
40 $this->ds->setImportDirectory($this->getImportDirectory());
41 $parser = new ilDataSetImportParser(
42 $a_entity,
43 $this->getSchemaVersion(),
44 $a_xml,
45 $this->ds,
46 $a_mapping
47 );
48 }
49
50 public function finalProcessing(
51 ilImportMapping $a_mapping
52 ): void {
53 $prttpg_map = $a_mapping->getMappingsOfEntity("components/ILIAS/COPage", "pg");
54 foreach ($prttpg_map as $prttpg_id) {
55 $prttpg_id = (int) substr($prttpg_id, 5);
57 ilPortfolioTemplatePage::_writeParentId("prtt", $prttpg_id, $prtt_id);
58 }
59 }
60}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _writeParentId(string $a_parent_type, int $a_pg_id, int $a_par_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
finalProcessing(ilImportMapping $a_mapping)
static findPortfolioForPage(int $a_page_id)
Get portfolio id of page id.
Xml importer class.
setImportDirectory(string $a_val)