ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilHelpDataSet Class Reference

Help system data set class. More...

+ Inheritance diagram for ilHelpDataSet:
+ Collaboration diagram for ilHelpDataSet:

Public Member Functions

 getSupportedVersions ()
 Get supported versions. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 readData ($a_entity, $a_version, $a_ids, $a_field="")
 Read data. More...
 
 importRecord ($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 Import record. More...
 
- Public Member Functions inherited from ilDataSet
 __construct ()
 Constructor. More...
 
 init ($a_entity, $a_schema_version)
 Init. More...
 
 getSupportedVersions ()
 Get supported version. More...
 
 readData ($a_entity, $a_version, $a_ids)
 Read data from DB. More...
 
 setExportDirectories ($a_relative, $a_absolute)
 Set export directories. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setDSPrefix ($a_val)
 Set XML dataset namespace prefix. More...
 
 getDSPrefix ()
 Get XML dataset namespace prefix. More...
 
 getDSPrefixString ()
 
 getDirectDataFromQuery ($a_query, $a_convert_to_leading_upper=true, $a_set=true)
 Get data from query.This is a standard procedure, all db field names are directly mapped to abstract fields. More...
 
 convertToLeadingUpper ($a_str)
 Make xyz_abc a XyzAbc string. More...
 
 getJsonRepresentation ()
 Get json representation. More...
 
 getXmlRepresentation ( $a_entity, $a_schema_version, $a_ids, $a_field="", $a_omit_header=false, $a_omit_types=false)
 Get xml representation <dataset install_id="123" install_url="..."> <types entity="table_name" version="4.0.1"> <ftype name="field_1" type="text"> <ftype name="field_2" type="date"> <ftype name="field_3" type="integer"> </types> <types ...> ... More...
 
 addRecordsXml ($a_writer, $a_prefixes, $a_entity, $a_schema_version, $a_ids, $a_field="")
 Add records xml. More...
 
 afterXmlRecordWriting ($a_entity, $a_version, $a_set)
 After xml record writing hook record. More...
 
 getNamespaces (&$namespaces, $a_entity, $a_schema_version)
 Get xml namespaces. More...
 
 getXmlRecord ($a_entity, $a_version, $a_set)
 Get xml record for version. More...
 
 getJsonRecord ($a_set)
 Get json record for version. More...
 
 getXmlTypes ($a_entity, $a_version)
 Get xml types. More...
 
 getJsonTypes ($a_entity, $a_version)
 Get json types. More...
 
 getXMLEntityName ($a_entity, $a_version)
 Get entity name for xml (may be overwritten) More...
 
 getXMLEntityTag ($a_entity, $a_schema_version)
 Get entity tag. More...
 
 getJsonEntityName ($a_entity, $a_version)
 Get entity name for json (may be overwritten) More...
 
 setImport ($a_val)
 Set import object. More...
 
 getImport ()
 Get import object. More...
 
 setCurrentInstallationId ($a_val)
 Set current installation id. More...
 
 getCurrentInstallationId ()
 Get current installation id. More...
 

Protected Member Functions

 getTypes ($a_entity, $a_version)
 Get field types for entity. More...
 
 getDependencies ($a_entity, $a_version, $a_rec, $a_ids)
 Determine the dependent sets of data. More...
 
- Protected Member Functions inherited from ilDataSet
 getTypes ($a_entity, $a_version)
 Get (abstract) types for (abstract) field names. More...
 
 getXmlNamespace ($a_entity, $a_schema_version)
 Get xml namespace. More...
 
 createObjectExportId ($a_type, $a_id)
 Build ilias export id. More...
 
 parseObjectExportId ($a_id, $a_fallback_id=null)
 Parse export id. More...
 

Additional Inherited Members

- Data Fields inherited from ilDataSet
 $dircnt
 
const EXPORT_NO_INST_ID = 1
 
const EXPORT_ID_ILIAS_LOCAL = 2
 
const EXPORT_ID_ILIAS_LOCAL_INVALID = 3
 
const EXPORT_ID_ILIAS_REMOTE = 4
 
const EXPORT_ID_ILIAS_REMOTE_INVALID = 5
 
const EXPORT_ID = 6
 
const EXPORT_ID_INVALID = 7
 
- Protected Attributes inherited from ilDataSet
 $current_installation_id = ""
 
 $db
 
 $ds_log
 

Detailed Description

Help system data set class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 14 of file class.ilHelpDataSet.php.

Member Function Documentation

◆ getDependencies()

ilHelpDataSet::getDependencies (   $a_entity,
  $a_version,
  $a_rec,
  $a_ids 
)
protected

Determine the dependent sets of data.

Definition at line 111 of file class.ilHelpDataSet.php.

112  {
113  return false;
114  }

◆ getSupportedVersions()

ilHelpDataSet::getSupportedVersions ( )

Get supported versions.

Parameters

Definition at line 23 of file class.ilHelpDataSet.php.

References array.

24  {
25  return array("4.3.0");
26  }
Create styles array
The data for the language used.

◆ getTypes()

ilHelpDataSet::getTypes (   $a_entity,
  $a_version 
)
protected

Get field types for entity.

Parameters

Definition at line 45 of file class.ilHelpDataSet.php.

References array.

46  {
47  if ($a_entity == "help_map") {
48  switch ($a_version) {
49  case "4.3.0":
50  return array(
51  "Chap" => "integer",
52  "Component" => "text",
53  "ScreenId" => "text",
54  "ScreenSubId" => "text",
55  "Perm" => "text"
56  );
57  }
58  }
59 
60  if ($a_entity == "help_tooltip") {
61  switch ($a_version) {
62  case "4.3.0":
63  return array(
64  "Id" => "integer",
65  "TtText" => "text",
66  "TtId" => "text",
67  "Comp" => "text",
68  "Lang" => "text"
69  );
70  }
71  }
72  }
Create styles array
The data for the language used.

◆ getXmlNamespace()

ilHelpDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Get xml namespace.

Parameters

Definition at line 34 of file class.ilHelpDataSet.php.

35  {
36  return "http://www.ilias.de/xml/Services/Help/" . $a_entity;
37  }

◆ importRecord()

ilHelpDataSet::importRecord (   $a_entity,
  $a_types,
  $a_rec,
  $a_mapping,
  $a_schema_version 
)

Import record.

Parameters

Definition at line 123 of file class.ilHelpDataSet.php.

References $t, ilHelp\addTooltip(), and ilHelpMapping\saveMappingEntry().

124  {
125  switch ($a_entity) {
126  case "help_map":
127 
128  include_once("./Services/Help/classes/class.ilHelpMapping.php");
129 
130  // without module ID we do nothing
131  $module_id = $a_mapping->getMapping('Services/Help', 'help_module', 0);
132  $t = $a_mapping->getAllMappings();
133  if ($module_id) {
134  $new_chap = $a_mapping->getMapping(
135  'Services/Help',
136  'help_chap',
137  $a_rec["Chap"]
138  );
139 
140  // new import (5.1): get chapter from learning module import mapping
141  if ($new_chap == 0) {
142  $new_chap = $a_mapping->getMapping(
143  'Modules/LearningModule',
144  'lm_tree',
145  $a_rec["Chap"]
146  );
147  }
148 
149  if ($new_chap > 0) {
151  $new_chap,
152  $a_rec["Component"],
153  $a_rec["ScreenId"],
154  $a_rec["ScreenSubId"],
155  $a_rec["Perm"],
156  $module_id
157  );
158  }
159  }
160  break;
161 
162  case "help_tooltip":
163 
164  include_once("./Services/Help/classes/class.ilHelp.php");
165 
166  // without module ID we do nothing
167  $module_id = $a_mapping->getMapping('Services/Help', 'help_module', 0);
168  if ($module_id) {
169  ilHelp::addTooltip($a_rec["TtId"], $a_rec["TtText"], $module_id);
170  }
171  break;
172  }
173  }
static saveMappingEntry( $a_chap, $a_comp, $a_screen_id, $a_screen_sub_id, $a_perm, $a_module_id=0)
Save mapping entry.
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
+ Here is the call graph for this function:

◆ readData()

ilHelpDataSet::readData (   $a_entity,
  $a_version,
  $a_ids,
  $a_field = "" 
)

Read data.

Parameters

Definition at line 80 of file class.ilHelpDataSet.php.

References ilDataSet\$db, $ilDB, array, and ilDataSet\getDirectDataFromQuery().

81  {
82  $ilDB = $this->db;
83 
84  if (!is_array($a_ids)) {
85  $a_ids = array($a_ids);
86  }
87 
88  if ($a_entity == "help_map") {
89  switch ($a_version) {
90  case "4.3.0":
91  $this->getDirectDataFromQuery("SELECT chap, component, screen_id, screen_sub_id, perm " .
92  " FROM help_map " .
93  "WHERE " .
94  $ilDB->in("chap", $a_ids, false, "integer"));
95  break;
96  }
97  }
98 
99  if ($a_entity == "help_tooltip") {
100  switch ($a_version) {
101  case "4.3.0":
102  $this->getDirectDataFromQuery("SELECT id, tt_text, tt_id, comp, lang FROM help_tooltip");
103  break;
104  }
105  }
106  }
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

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