ILIAS  release_4-4 Revision
class.ilBlogImporter.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 
14 {
15  protected $ds;
16 
20  function init()
21  {
22  include_once("./Modules/Blog/classes/class.ilBlogDataSet.php");
23  $this->ds = new ilBlogDataSet();
24  $this->ds->setDSPrefix("ds");
25  }
26 
33  function importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
34  {
35  $this->ds->setImportDirectory($this->getImportDirectory());
36  include_once("./Services/DataSet/classes/class.ilDataSetImportParser.php");
37  $parser = new ilDataSetImportParser($a_entity, $this->getSchemaVersion(),
38  $a_xml, $this->ds, $a_mapping);
39  }
40 
46  function finalProcessing($a_mapping)
47  {
48  $blp_map = $a_mapping->getMappingsOfEntity("Services/COPage", "pg");
49  foreach ($blp_map as $blp_id)
50  {
51  $blp_id = substr($blp_id, 4);
52  $blog_id = ilBlogPosting::lookupBlogId($blp_id);
53  ilBlogPosting::_writeParentId("blp", $blp_id, $blog_id);
54  }
55  }
56 }
57 
58 ?>
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
getSchemaVersion()
Get schema version.
finalProcessing($a_mapping)
Final processing.
static lookupBlogId($a_posting_id)
Lookup blog id.
_writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
getImportDirectory()
Get import directory.
Blog Data set class.
Manifest parser for ILIAS standard export files.
Importer class for blog.
init()
Initialisation.
Xml importer class.