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

Exporter class for sessions. More...

+ Inheritance diagram for ilForumExporter:
+ Collaboration diagram for ilForumExporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. 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...
 
- 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...
 

Private Attributes

 $ds
 

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...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Detailed Description

Exporter class for sessions.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id

Definition at line 11 of file class.ilForumExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilForumExporter::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.

Returns

Reimplemented from ilXmlExporter.

Definition at line 77 of file class.ilForumExporter.php.

78 {
79 return array(
80 "4.1.0" => array(
81 "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_1",
82 "xsd_file" => "ilias_frm_4_1.xsd",
83 "uses_dataset" => false,
84 "min" => "4.1.0",
85 "max" => "4.4.999"
86 ),
87 "4.5.0" => array(
88 "namespace" => "http://www.ilias.de/Modules/Forum/frm/4_5",
89 "xsd_file" => "ilias_frm_4_5.xsd",
90 "uses_dataset" => false,
91 "min" => "4.5.0",
92 "max" => "5.0.999"
93 ),
94 "5.1.0" => array(
95 "namespace" => "http://www.ilias.de/Modules/Forum/frm/5_1",
96 "xsd_file" => "ilias_frm_5_1.xsd",
97 "uses_dataset" => false,
98 "min" => "5.1.0",
99 "max" => ""
100 )
101 );
102 }

◆ getXmlExportTailDependencies()

ilForumExporter::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 47 of file class.ilForumExporter.php.

48 {
49 $res = [];
50
51 if ($a_entity == "frm") {
52 // service settings
53 $res[] = array(
54 "component" => "Services/Object",
55 "entity" => "common",
56 "ids" => $a_ids
57 );
58 }
59
60 // news settings
61 $res[] = [
62 "component" => "Services/News",
63 "entity" => "news_settings",
64 "ids" => $a_ids
65 ];
66
67 return $res;
68 }
foreach($_POST as $key=> $value) $res

References $res.

◆ getXmlRepresentation()

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

Get xml representation.

Parameters
stringentity
stringtarget release
stringid
Returns
string xml string

Reimplemented from ilXmlExporter.

Definition at line 31 of file class.ilForumExporter.php.

32 {
33 $xml = '';
34
35 if (ilObject::_lookupType($a_id) == 'frm') {
36 $writer = new ilForumXMLWriter();
37 $writer->setForumId($a_id);
39 $writer->setFileTargetDirectories($this->getRelativeExportDirectory(), $this->getAbsoluteExportDirectory());
40 $writer->start();
41 $xml .= $writer->getXml();
42 }
43
44 return $xml;
45 }
static _lookupType($a_id, $a_reference=false)
lookup object type
static makeDirParents($a_dir)
Create a new directory and all parent directories.
getRelativeExportDirectory()
Get relative export directory.
getAbsoluteExportDirectory()
Get absolute export directory.

References $xml, ilObject\_lookupType(), ilXmlExporter\getAbsoluteExportDirectory(), ilXmlExporter\getRelativeExportDirectory(), and ilUtil\makeDirParents().

+ Here is the call graph for this function:

◆ init()

ilForumExporter::init ( )

Initialisation.

Reimplemented from ilXmlExporter.

Definition at line 18 of file class.ilForumExporter.php.

19 {
20 }

Field Documentation

◆ $ds

ilForumExporter::$ds
private

Definition at line 13 of file class.ilForumExporter.php.


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