ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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)
 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 = ""
 

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 121 of file class.ilHelpDataSet.php.

122  {
123  return false;
124  }

◆ getSupportedVersions()

ilHelpDataSet::getSupportedVersions ( )

Get supported versions.

Parameters

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

23  {
24  return array("4.3.0");
25  }

◆ getTypes()

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

Get field types for entity.

Parameters

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

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

◆ getXmlNamespace()

ilHelpDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Get xml namespace.

Parameters

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

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

◆ importRecord()

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

Import record.

Parameters

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

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

134  {
135  switch ($a_entity)
136  {
137  case "help_map":
138 
139  include_once("./Services/Help/classes/class.ilHelpMapping.php");
140 
141  // without module ID we do nothing
142  $module_id = $a_mapping->getMapping('Services/Help','help_module', 0);
143  $t = $a_mapping->getAllMappings();
144  if ($module_id)
145  {
146  $new_chap = $a_mapping->getMapping('Services/Help', 'help_chap',
147  $a_rec["Chap"]);
148 
149  // new import (5.1): get chapter from learning module import mapping
150  if ($new_chap == 0)
151  {
152  $new_chap = $a_mapping->getMapping('Modules/LearningModule', 'lm_tree',
153  $a_rec["Chap"]);
154  }
155 
156  if ($new_chap > 0)
157  {
159  $a_rec["Component"],
160  $a_rec["ScreenId"],
161  $a_rec["ScreenSubId"],
162  $a_rec["Perm"],
163  $module_id
164  );
165  }
166  }
167  break;
168 
169  case "help_tooltip":
170 
171  include_once("./Services/Help/classes/class.ilHelp.php");
172 
173  // without module ID we do nothing
174  $module_id = $a_mapping->getMapping('Services/Help','help_module',0);
175  if ($module_id)
176  {
177  ilHelp::addTooltip($a_rec["TtId"], $a_rec["TtText"], $module_id);
178  }
179  break;
180  }
181  }
static addTooltip($a_tt_id, $a_text, $a_module_id=0)
Add tooltip.
static saveMappingEntry($a_chap, $a_comp, $a_screen_id, $a_screen_sub_id, $a_perm, $a_module_id=0)
Save mapping entry.
+ 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 84 of file class.ilHelpDataSet.php.

References $ilDB, and ilDataSet\getDirectDataFromQuery().

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

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