ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilChatroomExporter Class Reference

Class ilChatroomExporter. More...

+ Inheritance diagram for ilChatroomExporter:
+ Collaboration diagram for ilChatroomExporter:

Public Member Functions

 init ()
 
 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)
 
- 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)
 

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="")
 
- Protected Attributes inherited from ilXmlExporter
string $dir_relative = ""
 
string $dir_absolute = ""
 
ilExport $exp
 

Detailed Description

Class ilChatroomExporter.

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

Member Function Documentation

◆ getValidSchemaVersions()

ilChatroomExporter::getValidSchemaVersions ( string  $a_entity)

Definition at line 61 of file class.ilChatroomExporter.php.

61  : array
62  {
63  return [
64  '5.3.0' => [
65  'namespace' => 'https://www.ilias.de/Modules/Chatroom/chtr/5_3',
66  'xsd_file' => 'ilias_chtr_5_3.xsd',
67  'uses_dataset' => false,
68  'min' => '5.3.0',
69  'max' => ''
70  ]
71  ];
72  }

◆ getXmlExportTailDependencies()

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

Definition at line 46 of file class.ilChatroomExporter.php.

46  : array
47  {
48  $deps = [];
49 
50  if ('chtr' === $a_entity) {
51  $deps[] = [
52  'component' => 'Services/Object',
53  'entity' => 'common',
54  'ids' => $a_ids
55  ];
56  }
57 
58  return $deps;
59  }

◆ getXmlRepresentation()

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

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

References $GLOBALS, and ilObjectFactory\getInstanceByObjId().

30  : string
31  {
32  $chat = ilObjectFactory::getInstanceByObjId((int) $a_id, false);
33  if (!($chat instanceof ilObjChatroom)) {
34  $GLOBALS['DIC']->logger()->root()->warning(
35  $a_id . ' is not id of chatroom instance. Skipped generation of export XML.'
36  );
37  return '';
38  }
39 
40  $writer = new ilChatroomXMLWriter($chat);
41  $writer->start();
42 
43  return $writer->getXML();
44  }
Class ilChatroomXMLWriter.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ init()

ilChatroomExporter::init ( )

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

26  : void
27  {
28  }

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