ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilWebResourceExporter Class Reference

Booking definition. More...

+ 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

Booking definition.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilWebResourceExporter::__construct ( )

Constructor.

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

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

36  {
37  global $DIC;
38 
40  $this->logger = $DIC->logger()->webr();
41  }
global $DIC
Definition: shib_login.php:22
__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 96 of file class.ilWebResourceExporter.php.

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

◆ getXmlExportTailDependencies()

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

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

References $id.

69  : array {
70  $deps = [];
71  // service settings
72  $deps[] = [
73  "component" => "components/ILIAS/ILIASObject",
74  "entity" => "common",
75  "ids" => $a_ids
76  ];
77 
78  $md_ids = [];
79  foreach ($a_ids as $id) {
80  $md_ids[] = $id . ':0:webr';
81  }
82  if (!empty($md_ids)) {
83  $deps[] = [
84  'component' => 'components/ILIAS/MetaData',
85  'entity' => 'md',
86  'ids' => $md_ids,
87  ];
88  }
89 
90  return $deps;
91  }
$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 46 of file class.ilWebResourceExporter.php.

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

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

◆ init()

ilWebResourceExporter::init ( )

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

109  : void
110  {
111  }

Field Documentation

◆ $logger

ilLogger ilWebResourceExporter::$logger
protected

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

◆ $writer

ilWebLinkXmlWriter ilWebResourceExporter::$writer = null
private

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


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