ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContentPageDataSet Class Reference

Class ilContentPageDataSet. More...

+ Inheritance diagram for ilContentPageDataSet:
+ Collaboration diagram for ilContentPageDataSet:

Public Member Functions

 getSupportedVersions ()
 
 getXmlNamespace ($a_entity, $a_schema_version)
 
 readData ($a_entity, $a_version, $a_ids)
 
 importRecord ($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
 
- 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)
 
 getDependencies ($a_entity, $a_version, $a_rec, $a_ids)
 
- 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

 $data = []
 
 $newMobIds = []
 
- 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
 
- Data Fields inherited from ilContentPageObjectConstants
const OBJ_TYPE = 'copa'
 
const UI_CMD_VIEW = 'view'
 
const UI_CMD_EDIT = 'edit'
 
const UI_CMD_UPDATE = 'update'
 
const UI_CMD_COPAGE_DOWNLOAD_FILE = 'downloadFile'
 
const UI_CMD_COPAGE_DISPLAY_FULLSCREEN = 'displayMediaFullscreen'
 
const UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH = 'download_paragraph'
 
const UI_TAB_ID_CONTENT = 'content'
 
const UI_TAB_ID_INFO = 'info_short'
 
const UI_TAB_ID_SETTINGS = 'settings'
 
const UI_TAB_ID_ICON = 'icon'
 
const UI_TAB_ID_STYLE = 'style'
 
const UI_TAB_ID_LP = 'learning_progress'
 
const UI_TAB_ID_EXPORT = 'export'
 
const UI_TAB_ID_PERMISSIONS = 'perm_settings'
 

Detailed Description

Class ilContentPageDataSet.

Definition at line 7 of file class.ilContentPageDataSet.php.

Member Function Documentation

◆ getDependencies()

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

Definition at line 151 of file class.ilContentPageDataSet.php.

152  {
153  return false;
154  }

◆ getSupportedVersions()

ilContentPageDataSet::getSupportedVersions ( )

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

23  {
24  return [
25  '5.4.0',
26  ];
27  }

◆ getTypes()

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

Definition at line 40 of file class.ilContentPageDataSet.php.

41  {
42  switch ($a_entity) {
43  case self::OBJ_TYPE:
44  return [
45  'id' => 'integer',
46  'title' => 'text',
47  'description' => 'text',
48  'info-tab' => 'integer',
49  'style-id' => 'integer',
50  ];
51 
52  default:
53  return [];
54  }
55  }

◆ getXmlNamespace()

ilContentPageDataSet::getXmlNamespace (   $a_entity,
  $a_schema_version 
)

Definition at line 32 of file class.ilContentPageDataSet.php.

33  {
34  return 'http://www.ilias.de/xml/Modules/ContentPage/' . $a_entity;
35  }

◆ importRecord()

ilContentPageDataSet::importRecord (   $a_entity,
  $a_types,
  $a_rec,
  $a_mapping,
  $a_schema_version 
)
Parameters
$a_entity
$a_types
$a_rec
\ilImportMapping$a_mapping
$a_schema_version

Definition at line 112 of file class.ilContentPageDataSet.php.

References ilContainer\_writeContainerSetting(), ilObjectFactory\getInstanceByObjId(), ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY, and ilUtil\stripSlashes().

113  {
114  switch ($a_entity) {
115  case self::OBJ_TYPE:
116  if ($newObjId = $a_mapping->getMapping('Services/Container', 'objs', $a_rec['id'])) {
117  $newObject = \ilObjectFactory::getInstanceByObjId($newObjId, false);
118  } else {
119  $newObject = new \ilObjContentPage();
120  }
121 
122  $newObject->setTitle(\ilUtil::stripSlashes($a_rec['title']));
123  $newObject->setDescription(\ilUtil::stripSlashes($a_rec['description']));
124  $newObject->setStyleSheetId((int) \ilUtil::stripSlashes($a_rec['style-id']));
125 
126  if (!$newObject->getId()) {
127  $newObject->create();
128  }
129 
131  $newObject->getId(),
133  (int) $a_rec['info-tab']
134  );
135 
136  $a_mapping->addMapping('Modules/ContentPage', self::OBJ_TYPE, $a_rec['id'], $newObject->getId());
137  $a_mapping->addMapping('Modules/ContentPage', 'style', $newObject->getId(), $newObject->getStyleSheetId());
138  $a_mapping->addMapping(
139  'Services/COPage',
140  'pg',
141  self::OBJ_TYPE . ':' . $a_rec['id'],
142  self::OBJ_TYPE . ':' . $newObject->getId()
143  );
144  break;
145  }
146  }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _writeContainerSetting($a_id, $a_keyword, $a_value)
+ Here is the call graph for this function:

◆ readData()

ilContentPageDataSet::readData (   $a_entity,
  $a_version,
  $a_ids 
)

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

References ilContainer\_lookupContainerSetting(), ilObject\_lookupType(), data, ilObjectFactory\getInstanceByObjId(), and ilObjectServiceSettingsGUI\INFO_TAB_VISIBILITY.

61  {
62  $this->data = [];
63 
64  if (!is_array($a_ids)) {
65  $a_ids = [$a_ids];
66  }
67 
68  $this->readEntityData($a_entity, $a_ids);
69  }
$this data['403_header']
+ Here is the call graph for this function:

Field Documentation

◆ $data

ilContentPageDataSet::$data = []
protected

Definition at line 12 of file class.ilContentPageDataSet.php.

◆ $newMobIds

ilContentPageDataSet::$newMobIds = []
protected

Definition at line 17 of file class.ilContentPageDataSet.php.


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