ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContentPageImporter Class Reference

Class ilContentPageImporter. More...

+ Inheritance diagram for ilContentPageImporter:
+ Collaboration diagram for ilContentPageImporter:

Public Member Functions

 init ()
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 
 finalProcessing ($a_mapping)
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Protected Attributes

 $ds
 
- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 
 $imp
 

Additional Inherited Members

- Data Fields inherited from ilContentPageObjectConstants
const OBJ_TYPE = 'copa'
 
const UI_CMD_VIEW = 'view'
 
const UI_CMD_EDIT = 'edit'
 
const UI_CMD_UPDATE = 'update'
 
const UI_CMD_COPAGE_DOWNLOAD_FILE = 'downloadFile'
 
const UI_CMD_COPAGE_DISPLAY_FULLSCREEN = 'displayMediaFullscreen'
 
const UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH = 'download_paragraph'
 
const UI_TAB_ID_CONTENT = 'content'
 
const UI_TAB_ID_INFO = 'info_short'
 
const UI_TAB_ID_SETTINGS = 'settings'
 
const UI_TAB_ID_ICON = 'icon'
 
const UI_TAB_ID_STYLE = 'style'
 
const UI_TAB_ID_LP = 'learning_progress'
 
const UI_TAB_ID_EXPORT = 'export'
 
const UI_TAB_ID_PERMISSIONS = 'perm_settings'
 

Detailed Description

Class ilContentPageImporter.

Definition at line 7 of file class.ilContentPageImporter.php.

Member Function Documentation

◆ finalProcessing()

ilContentPageImporter::finalProcessing (   $a_mapping)

Definition at line 35 of file class.ilContentPageImporter.php.

References ilPageObject\_writeParentId(), and ilObjectFactory\getInstanceByObjId().

36  {
37  parent::finalProcessing($a_mapping);
38 
39  $copaMap = $a_mapping->getMappingsOfEntity('Services/COPage', 'pg');
40  foreach ($copaMap as $oldCopaId => $newCopaId) {
41  $newCopaId = substr($newCopaId, strlen(self::OBJ_TYPE) + 1);
42 
43  \ilContentPagePage::_writeParentId(self::OBJ_TYPE, $newCopaId, $newCopaId);
44  }
45 
46  $styleMapping = $a_mapping->getMappingsOfEntity('Modules/ContentPage', 'style');
47  foreach ($styleMapping as $newCopaId => $oldStyleId) {
48  $newStyleId = (int) $a_mapping->getMapping('Services/Style', 'sty', $oldStyleId);
49  if ($newCopaId > 0 && $newStyleId > 0) {
50  $copa = \ilObjectFactory::getInstanceByObjId($newCopaId, false);
51  if (!$copa || !($copa instanceof \ilObjContentPage)) {
52  continue;
53  }
54  $copa->writeStyleSheetId($newStyleId);
55  $copa->update();
56  }
57  }
58  }
static _writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjContentPage.
+ Here is the call graph for this function:

◆ importXmlRepresentation()

ilContentPageImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Definition at line 27 of file class.ilContentPageImporter.php.

References $parser, and ilXmlImporter\getSchemaVersion().

28  {
29  $parser = new \ilDataSetImportParser($a_entity, $this->getSchemaVersion(), $a_xml, $this->ds, $a_mapping);
30  }
getSchemaVersion()
Get schema version.
$parser
Definition: BPMN2Parser.php:23
+ Here is the call graph for this function:

◆ init()

ilContentPageImporter::init ( )

Definition at line 17 of file class.ilContentPageImporter.php.

References ilXmlImporter\getImportDirectory().

18  {
19  $this->ds = new \ilContentPageDataSet();
20  $this->ds->setDSPrefix('ds');
21  $this->ds->setImportDirectory($this->getImportDirectory());
22  }
getImportDirectory()
Get import directory.
+ Here is the call graph for this function:

Field Documentation

◆ $ds

ilContentPageImporter::$ds
protected

Definition at line 12 of file class.ilContentPageImporter.php.


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