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

Class ilContentPageExporter. More...

+ Inheritance diagram for ilContentPageExporter:
+ Collaboration diagram for ilContentPageExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 
 getValidSchemaVersions ($a_entity)
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Protected Attributes

 $ds
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- 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 ilContentPageExporter.

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

Member Function Documentation

◆ getValidSchemaVersions()

ilContentPageExporter::getValidSchemaVersions (   $a_entity)

Definition at line 37 of file class.ilContentPageExporter.php.

38  {
39  return array(
40  '5.4.0' => array(
41  'namespace' => 'http://www.ilias.de/Modules/ContentPage/' . self::OBJ_TYPE . '/5_4',
42  'xsd_file' => 'ilias_' . self::OBJ_TYPE . '_5_4.xsd',
43  'uses_dataset' => true,
44  'min' => '5.4.0',
45  'max' => '',
46  ),
47  );
48  }

◆ getXmlExportTailDependencies()

ilContentPageExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Definition at line 53 of file class.ilContentPageExporter.php.

References ilObjectFactory\getInstanceByObjId().

54  {
55  $pageObjectIds = [];
56  $styleIds = [];
57 
58  foreach ($a_ids as $copaObjId) {
59  $copa = \ilObjectFactory::getInstanceByObjId($copaObjId, false);
60  if (!$copa || !($copa instanceof \ilObjContentPage)) {
61  continue;
62  }
63 
64  $copaPageObjIds = $copa->getPageObjIds();
65  foreach ($copaPageObjIds as $copaPageObjId) {
66  $pageObjectIds[] = self::OBJ_TYPE . ':' . $copaPageObjId;
67  }
68 
69  if ($copa->getStyleSheetId() > 0) {
70  $styleIds[$copa->getStyleSheetId()] = $copa->getStyleSheetId();
71  }
72  }
73 
74  $deps = [];
75 
76  if (count($pageObjectIds) > 0) {
77  $deps[] = [
78  'component' => 'Services/COPage',
79  'entity' => 'pg',
80  'ids' => $pageObjectIds,
81  ];
82  }
83 
84  if (count($styleIds) > 0) {
85  $deps[] = [
86  'component' => 'Services/Style',
87  'entity' => 'sty',
88  'ids' => array_values($styleIds),
89  ];
90  }
91 
92  return $deps;
93  }
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:

◆ getXmlRepresentation()

ilContentPageExporter::getXmlRepresentation (   $a_entity,
  $a_schema_version,
  $a_id 
)

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

References ilXmlExporter\getAbsoluteExportDirectory(), and ilUtil\makeDirParents().

27  {
29  $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
30 
31  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, '', true, true);
32  }
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getAbsoluteExportDirectory()
Get absolute export directory.
+ Here is the call graph for this function:

◆ init()

ilContentPageExporter::init ( )

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

18  {
19  $this->ds = new \ilContentPageDataSet();
20  $this->ds->setDSPrefix('ds');
21  }

Field Documentation

◆ $ds

ilContentPageExporter::$ds
protected

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


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