ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilNewsExporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilNewsExporter:
+ Collaboration diagram for ilNewsExporter:

Public Member Functions

 init ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 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)
 

Private Attributes

ilNewsDataSet $ds
 

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
ilExport $exp
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Exporter class for news

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ getValidSchemaVersions()

ilNewsExporter::getValidSchemaVersions ( string  $a_entity)

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

63  : array
64  {
65  return [
66  "5.4.0" => [
67  "namespace" => "https://www.ilias.de/Services/News/news/5_4",
68  "xsd_file" => "ilias_news_5_4.xsd",
69  "uses_dataset" => true,
70  "min" => "5.4.0",
71  "max" => ""
72  ],
73  "4.1.0" => [
74  "namespace" => "https://www.ilias.de/Services/News/news/4_1",
75  "xsd_file" => "ilias_news_4_1.xsd",
76  "uses_dataset" => true,
77  "min" => "4.1.0",
78  "max" => ""
79  ]
80  ];
81  }

◆ getXmlExportHeadDependencies()

ilNewsExporter::getXmlExportHeadDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)
Returns
array array of array with keys "component", entity", "ids"

Definition at line 38 of file class.ilNewsExporter.php.

References $id, and ilNewsItem\_lookupMobId().

38  : array
39  {
40  $mob_ids = [];
41 
42  foreach ($a_ids as $id) {
43  $mob_id = ilNewsItem::_lookupMobId((int) $id);
44  if ($mob_id > 0) {
45  $mob_ids[$mob_id] = $mob_id;
46  }
47  }
48 
49  return [
50  [
51  "component" => "components/ILIAS/MediaObjects",
52  "entity" => "mob",
53  "ids" => $mob_ids
54  ]
55  ];
56  }
static _lookupMobId(int $a_news_id)
Lookup mob id.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Definition at line 58 of file class.ilNewsExporter.php.

58  : string
59  {
60  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
61  }

◆ init()

ilNewsExporter::init ( )

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

28  : void
29  {
30  $this->ds = new ilNewsDataSet();
31  $this->ds->initByExporter($this);
32  $this->ds->setDSPrefix("ds");
33  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $ds

ilNewsDataSet ilNewsExporter::$ds
private

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


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