ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPortfolioImporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Export/classes/class.ilXmlImporter.php");
5 
16 {
17  protected $ds;
18 
22  public function init()
23  {
24  include_once("./Modules/Portfolio/classes/class.ilPortfolioDataSet.php");
25  $this->ds = new ilPortfolioDataSet();
26  $this->ds->setDSPrefix("ds");
27  }
28 
35  public function importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
36  {
37  $this->ds->setImportDirectory($this->getImportDirectory());
38  include_once("./Services/DataSet/classes/class.ilDataSetImportParser.php");
40  $a_entity,
41  $this->getSchemaVersion(),
42  $a_xml,
43  $this->ds,
44  $a_mapping
45  );
46  }
47 
53  public function finalProcessing($a_mapping)
54  {
55  $prttpg_map = $a_mapping->getMappingsOfEntity("Services/COPage", "pg");
56  foreach ($prttpg_map as $prttpg_id) {
57  $prttpg_id = substr($prttpg_id, 5);
58  $prtt_id = ilPortfolioTemplatePage::findPortfolioForPage($prttpg_id);
59  ilPortfolioTemplatePage::_writeParentId("prtt", $prttpg_id, $prtt_id);
60  }
61  }
62 }
getSchemaVersion()
Get schema version.
getImportDirectory()
Get import directory.
finalProcessing($a_mapping)
Final processing.
static findPortfolioForPage($a_page_id)
Get portfolio id of page id.
Portfolio Data set class.
Manifest parser for ILIAS standard export files.
Importer class for portfolio.
static _writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
$parser
Definition: BPMN2Parser.php:23
Xml importer class.