ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilLearningSequenceExporter Class Reference
+ Inheritance diagram for ilLearningSequenceExporter:
+ Collaboration diagram for ilLearningSequenceExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation ($entity, $target_release, $obj_id)
 
 getValidSchemaVersions ($entity)
 
 getXmlExportHeadDependencies ($entity, $target_release, $ids)
 
 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 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 (   $entity)

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.

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

Referenced by getXmlRepresentation().

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 
36  return new ilLearningSequenceXMLWriter(
37  $ls_object,
38  $this->settings,
39  $lp_settings,
40  $this->rbac_review
41  );
42  }
settings()
Definition: settings.php:2
$type
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXmlExportHeadDependencies()

ilLearningSequenceExporter::getXmlExportHeadDependencies (   $entity,
  $target_release,
  $ids 
)

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 
)

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

References $res.

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

◆ getXmlRepresentation()

ilLearningSequenceExporter::getXmlRepresentation (   $entity,
  $target_release,
  $obj_id 
)

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

References getWriter().

19  {
20  $writer = $this->getWriter((int) $obj_id);
21  $writer->start();
22 
23  return $writer->getXml();
24  }
+ Here is the call graph for this function:

◆ init()

ilLearningSequenceExporter::init ( )

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

References $DIC, and settings().

11  {
12  global $DIC;
13 
14  $this->settings = $DIC["ilSetting"];
15  $this->rbac_review = $DIC["rbacreview"];
16  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

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