ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilChatroomExporter.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Export/classes/class.ilXmlExporter.php';
5 
10 {
14  public function init()
15  {
16  }
17 
21  public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
22  {
23  $chat = ilObjectFactory::getInstanceByObjId($a_id, false);
24  if (!($chat instanceof ilObjChatroom)) {
25  $GLOBALS['DIC']->logger()->root()->warning($a_id . ' is not id of chatroom instance. Skipped generation of export XML.');
26  return '';
27  }
28 
29  require_once 'Modules/Chatroom/classes/class.ilChatroomXMLWriter.php';
30  $writer = new ilChatroomXMLWriter($chat);
31  $writer->start();
32 
33  return $writer->getXml();
34  }
35 
39  public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
40  {
41  $deps = [];
42 
43  if ('chtr' === $a_entity) {
44  $deps[] = [
45  'component' => 'Services/Object',
46  'entity' => 'common',
47  'ids' => $a_ids
48  ];
49  }
50 
51  return $deps;
52  }
53 
57  public function getValidSchemaVersions($a_entity)
58  {
59  return array(
60  '5.3.0' => array(
61  'namespace' => 'http://www.ilias.de/Modules/Chatroom/chtr/5_3',
62  'xsd_file' => 'ilias_chtr_5_3.xsd',
63  'uses_dataset' => false,
64  'min' => '5.3.0',
65  'max' => '5.3.999'
66  )
67  );
68  }
69 }
Class ilChatroomXMLWriter.
Class ilChatroomExporter.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Xml Exporter class.
Class ilObjChatroom.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id