ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLearningSequenceExporter Class Reference
+ Inheritance diagram for ilLearningSequenceExporter:
+ Collaboration diagram for ilLearningSequenceExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation ($entity, $target_release, $obj_id)
 Get xml representation. More...
 
 getValidSchemaVersions ($entity)
 Returns schema versions that the component can export to. More...
 
 getXmlExportHeadDependencies ($entity, $target_release, $ids)
 Get head dependencies. 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 Member Functions

 getWriter (int $obj_id)
 

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

Member Function Documentation

◆ getValidSchemaVersions()

ilLearningSequenceExporter::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 44 of file class.ilLearningSequenceExporter.php.

45 {
46 return array(
47 "5.4.0" => array(
48 "namespace" => "http://www.ilias.de/Modules/LearningSequence/lso/5_4",
49 "xsd_file" => "ilias_lso_5_4.xsd",
50 "uses_dataset" => false,
51 "min" => "5.4.0",
52 "max" => ""
53 )
54 );
55 }

◆ getWriter()

ilLearningSequenceExporter::getWriter ( int  $obj_id)
protected

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

27 {
28 if ($type = ilObject::_lookupType($obj_id) != "lso") {
29 throw new Exception("Wrong type " . $type . " for lso export.");
30 }
31
32 $ls_ref_id = end(ilObject::_getAllReferences($obj_id));
33 $ls_object = ilObjectFactory::getInstanceByRefId($ls_ref_id, false);
34 $lp_settings = new ilLPObjSettings($obj_id);
35
37 $ls_object,
38 $this->settings,
39 $lp_settings,
40 $this->rbac_review
41 );
42 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
$type
settings()
Definition: settings.php:2

References $type, ilObject\_getAllReferences(), ilObject\_lookupType(), ilObjectFactory\getInstanceByRefId(), and settings().

Referenced by getXmlRepresentation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXmlExportHeadDependencies()

ilLearningSequenceExporter::getXmlExportHeadDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get head dependencies.

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

Reimplemented from ilXmlExporter.

Definition at line 57 of file class.ilLearningSequenceExporter.php.

58 {
59 return array(
60 array(
61 'component' => 'Services/Container',
62 'entity' => 'struct',
63 'ids' => $ids
64 )
65 );
66 }

◆ getXmlExportTailDependencies()

ilLearningSequenceExporter::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 71 of file class.ilLearningSequenceExporter.php.

72 {
73 $res = [];
74
75 if ($a_entity == "lso") {
76 // service settings
77 $res[] = array(
78 "component" => "Services/Object",
79 "entity" => "common",
80 "ids" => $a_ids
81 );
82 }
83
84 return $res;
85 }
foreach($_POST as $key=> $value) $res

References $res.

◆ getXmlRepresentation()

ilLearningSequenceExporter::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 18 of file class.ilLearningSequenceExporter.php.

19 {
20 $writer = $this->getWriter((int) $obj_id);
21 $writer->start();
22
23 return $writer->getXml();
24 }

References getWriter().

+ Here is the call graph for this function:

◆ init()

ilLearningSequenceExporter::init ( )

Reimplemented from ilXmlExporter.

Definition at line 10 of file class.ilLearningSequenceExporter.php.

11 {
12 global $DIC;
13
14 $this->settings = $DIC["ilSetting"];
15 $this->rbac_review = $DIC["rbacreview"];
16 }
$DIC
Definition: xapitoken.php:46

References $DIC, and settings().

+ Here is the call graph for this function:

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