ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAccessControlExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
5 include_once './Services/Export/classes/class.ilXmlExporter.php';
6 
17 {
18  private $writer = null;
19 
23  public function __construct()
24  {
25  }
26 
31  public function init()
32  {
33  }
34 
43  public function getXmlExportHeadDependencies($a_entity, $a_target_release, $a_ids)
44  {
45  return array();
46  }
47 
48 
56  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
57  {
58  global $DIC;
59 
60  $rbacreview = $DIC['rbacreview'];
61 
62  include_once './Services/AccessControl/classes/class.ilRoleXmlExport.php';
63  $writer = new ilRoleXmlExport();
64 
65  include_once './Services/Export/classes/class.ilExportOptions.php';
67  $eo->read();
68 
69  $rolf = $eo->getOptionByObjId($a_id, ilExportOptions::KEY_ROOT);
70  // @todo refactor rolf
71  $writer->setRoles(array($a_id => $rolf));
72  $writer->write();
73  return $writer->xmlDumpMem($format);
74  }
75 
83  public function getValidSchemaVersions($a_entity)
84  {
85  return array(
86  "4.3.0" => array(
87  "namespace" => "http://www.ilias.de/AccessControl/Role/role/4_3",
88  "xsd_file" => "ilias_role_4_3.xsd",
89  "uses_dataset" => false,
90  "min" => "4.3.0",
91  "max" => "")
92  );
93  }
94 }
$format
Definition: metadata.php:141
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
global $DIC
Definition: saml.php:7
static getInstance()
Get singelton instance.
Xml Exporter class.
getXmlExportHeadDependencies($a_entity, $a_target_release, $a_ids)
Get head dependencies.
Xml export of roles and role templates.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml.