ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilWebResourceExporter Class Reference
+ Inheritance diagram for ilWebResourceExporter:
+ Collaboration diagram for ilWebResourceExporter:

Public Member Functions

 __construct ()
 Constructor. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getValidSchemaVersions (string $a_entity)
 
 init ()
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Protected Attributes

ilLogger $logger
 
- Protected Attributes inherited from ilXmlExporter
ilExport $exp
 

Private Attributes

ilWebLinkXmlWriter $writer = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 

Detailed Description

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

Definition at line 24 of file class.ilWebResourceExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilWebResourceExporter::__construct ( )

Constructor.

Definition at line 33 of file class.ilWebResourceExporter.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\logger().

34  {
35  global $DIC;
36 
38  $this->logger = $DIC->logger()->webr();
39  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getValidSchemaVersions()

ilWebResourceExporter::getValidSchemaVersions ( string  $a_entity)

Definition at line 94 of file class.ilWebResourceExporter.php.

94  : array
95  {
96  return array(
97  "4.1.0" => array(
98  "namespace" => "http://www.ilias.de/Modules/WebResource/webr/4_1",
99  "xsd_file" => "ilias_webr_4_1.xsd",
100  "uses_dataset" => false,
101  "min" => "4.1.0",
102  "max" => ""
103  )
104  );
105  }

◆ getXmlExportTailDependencies()

ilWebResourceExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Definition at line 63 of file class.ilWebResourceExporter.php.

References $id.

67  : array {
68  $deps = [];
69  // service settings
70  $deps[] = [
71  "component" => "components/ILIAS/ILIASObject",
72  "entity" => "common",
73  "ids" => $a_ids
74  ];
75 
76  $md_ids = [];
77  foreach ($a_ids as $id) {
78  $md_ids[] = $id . ':0:webr';
79  }
80  if (!empty($md_ids)) {
81  $deps[] = [
82  'component' => 'components/ILIAS/MetaData',
83  'entity' => 'md',
84  'ids' => $md_ids,
85  ];
86  }
87 
88  return $deps;
89  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ getXmlRepresentation()

ilWebResourceExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)

Definition at line 44 of file class.ilWebResourceExporter.php.

References Vendor\Package\$e, and ILIAS\Repository\logger().

48  : string {
49  try {
50  $this->writer = new ilWebLinkXmlWriter(false);
51  $this->writer->setObjId((int) $a_id);
52  $this->writer->write();
53  return $this->writer->xmlDumpMem(false);
54  } catch (UnexpectedValueException $e) {
55  $this->logger->warning("Caught error: " . $e->getMessage());
56  return '';
57  }
58  }
+ Here is the call graph for this function:

◆ init()

ilWebResourceExporter::init ( )

Definition at line 107 of file class.ilWebResourceExporter.php.

107  : void
108  {
109  }

Field Documentation

◆ $logger

ilLogger ilWebResourceExporter::$logger
protected

Definition at line 28 of file class.ilWebResourceExporter.php.

◆ $writer

ilWebLinkXmlWriter ilWebResourceExporter::$writer = null
private

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


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