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

COPage Data set class. More...

+ Inheritance diagram for ilCOPageDataSet:
+ Collaboration diagram for ilCOPageDataSet:

Public Member Functions

 setMasterLanguageOnly ($a_val)
 Set master language only. More...
 
 getMasterLanguageOnly ()
 Get master language only. More...
 
 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...
 

Protected Attributes

 $master_lang_only = false
 
- Protected Attributes inherited from ilDataSet
 $current_installation_id = ""
 
 $db
 
 $ds_log
 

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
 

Detailed Description

COPage Data set class.

This class implements the following entities:

  • pgtp: page layout template

Please note that the usual page xml export DOES NOT use the dataset. The page export uses pre-existing methods to create the xml.

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

Definition at line 19 of file class.ilCOPageDataSet.php.

Member Function Documentation

◆ getDependencies()

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

Determine the dependent sets of data.

Definition at line 118 of file class.ilCOPageDataSet.php.

119  {
120  return false;
121  }

◆ getMasterLanguageOnly()

ilCOPageDataSet::getMasterLanguageOnly ( )

Get master language only.

Returns
bool export only master language

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

References $master_lang_only.

39  {
41  }

◆ getSupportedVersions()

ilCOPageDataSet::getSupportedVersions ( )

Get supported versions.

Parameters

Definition at line 49 of file class.ilCOPageDataSet.php.

References array.

50  {
51  return array("4.2.0");
52  }
Create styles array
The data for the language used.

◆ getTypes()

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

Get field types for entity.

Parameters

Definition at line 71 of file class.ilCOPageDataSet.php.

References array.

72  {
73  // pgtp: page layout template
74  if ($a_entity == "pgtp") {
75  switch ($a_version) {
76  case "4.2.0":
77  return array(
78  "Id" => "integer",
79  "Title" => "text",
80  "Description" => "text",
81  "SpecialPage" => "integer",
82  "StyleId" => "integer");
83  }
84  }
85  }
Create styles array
The data for the language used.

◆ getXmlNamespace()

ilCOPageDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Get xml namespace.

Parameters

Definition at line 60 of file class.ilCOPageDataSet.php.

61  {
62  return "http://www.ilias.de/xml/Services/COPage/" . $a_entity;
63  }

◆ importRecord()

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

Import record.

Parameters

Definition at line 134 of file class.ilCOPageDataSet.php.

135  {
136  switch ($a_entity) {
137  case "pgtp":
138  include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
139  $pt = new ilPageLayout();
140  $pt->setTitle($a_rec["Title"]);
141  $pt->setDescription($a_rec["Description"]);
142  $pt->setSpecialPage($a_rec["SpecialPage"]);
143  $pt->update();
144 
145  $this->current_obj = $pt;
146  $a_mapping->addMapping(
147  "Services/COPage",
148  "pgtp",
149  $a_rec["Id"],
150  $pt->getId()
151  );
152  $a_mapping->addMapping(
153  "Services/COPage",
154  "pg",
155  "stys:" . $a_rec["Id"],
156  "stys:" . $pt->getId()
157  );
158  break;
159  }
160  }
Class ilPageLayout.

◆ readData()

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

Read data.

Parameters

Definition at line 93 of file class.ilCOPageDataSet.php.

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

94  {
95  $db = $this->db;
96 
97  if (!is_array($a_ids)) {
98  $a_ids = array($a_ids);
99  }
100 
101  // mep_data
102  if ($a_entity == "pgtp") {
103  switch ($a_version) {
104  case "4.2.0":
105  $this->getDirectDataFromQuery("SELECT layout_id id, title, description, " .
106  " style_id, special_page " .
107  " FROM page_layout " .
108  "WHERE " .
109  $db->in("layout_id", $a_ids, false, "integer"));
110  break;
111  }
112  }
113  }
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.
+ Here is the call graph for this function:

◆ setMasterLanguageOnly()

ilCOPageDataSet::setMasterLanguageOnly (   $a_val)

Set master language only.

Parameters
bool$a_valexport only master language

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

29  {
30  $this->master_lang_only = $a_val;
31  }

Field Documentation

◆ $master_lang_only

ilCOPageDataSet::$master_lang_only = false
protected

Definition at line 21 of file class.ilCOPageDataSet.php.

Referenced by getMasterLanguageOnly().


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