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)
 Get xml representation.
Parameters
stringentity
stringschema version
stringid
Returns
string xml string
More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to.ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array
More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies.
Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"
More...
 
- 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)

Returns schema versions that the component can export to.ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top. Example:

            return array (
    "4.1.0" => array(
            "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1",
            "xsd_file" => "ilias_md_4_1.xsd",
            "min" => "4.1.0",
            "max" => "")
    );
Returns
array

Reimplemented from ilXmlExporter.

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 
)

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

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 }
Class ilObjContentPage.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id

References ilObjectFactory\getInstanceByObjId().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringschema version
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

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

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.

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

+ Here is the call graph for this function:

◆ init()

ilContentPageExporter::init ( )

Reimplemented from ilXmlExporter.

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: