ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDclDatatype Class Reference

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

+ Collaboration diagram for ilDclDatatype:

Public Member Functions

 __construct (int $a_id=0)
 Constructor public. More...
 
 getId ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setStorageLocation (int $a_id)
 Set Storage Location. More...
 
 getStorageLocation ()
 Get Storage Location. More...
 
 getDbType ()
 
 doRead ()
 Read Datatype. More...
 

Static Public Member Functions

static getAllDatatype (bool $force=false)
 Get all possible Datatypes. More...
 

Data Fields

const INPUTFORMAT_NONE = 0
 
const INPUTFORMAT_NUMBER = 1
 
const INPUTFORMAT_TEXT = 2
 
const INPUTFORMAT_REFERENCE = 3
 
const INPUTFORMAT_BOOLEAN = 4
 
const INPUTFORMAT_DATETIME = 5
 
const INPUTFORMAT_FILE = 6
 
const INPUTFORMAT_RATING = 7
 
const INPUTFORMAT_ILIAS_REF = 8
 
const INPUTFORMAT_MOB = 9
 
const INPUTFORMAT_REFERENCELIST = 10
 
const INPUTFORMAT_FORMULA = 11
 
const INPUTFORMAT_PLUGIN = 12
 
const INPUTFORMAT_TEXT_SELECTION = 14
 
const INPUTFORMAT_DATE_SELECTION = 15
 

Static Public Attributes

static array $datatype_cache = []
 

Protected Member Functions

 loadDatatype (array $rec)
 

Protected Attributes

int $id = 0
 
string $title = ""
 
int $storageLocation = 0
 
string $dbType
 

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

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

Constructor & Destructor Documentation

◆ __construct()

ilDclDatatype::__construct ( int  $a_id = 0)

Constructor public.

Definition at line 51 of file class.ilDclDatatype.php.

References doRead().

52  {
53  if ($a_id != 0) {
54  $this->id = $a_id;
55  $this->doRead();
56  }
57  }
doRead()
Read Datatype.
+ Here is the call graph for this function:

Member Function Documentation

◆ doRead()

ilDclDatatype::doRead ( )

Read Datatype.

Definition at line 98 of file class.ilDclDatatype.php.

References $DIC, $ilDB, $query, getId(), and loadDatatype().

Referenced by __construct().

98  : void
99  {
100  global $DIC;
101  $ilDB = $DIC['ilDB'];
102 
103  $query = "SELECT * FROM il_dcl_datatype WHERE id = " . $ilDB->quote(
104  $this->getId(),
105  "integer"
106  ) . " ORDER BY sort";
107  $set = $ilDB->query($query);
108  $rec = $ilDB->fetchAssoc($set);
109 
110  $this->loadDatatype($rec);
111  }
loadDatatype(array $rec)
global $DIC
Definition: feed.php:28
$query
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllDatatype()

static ilDclDatatype::getAllDatatype ( bool  $force = false)
static

Get all possible Datatypes.

Definition at line 116 of file class.ilDclDatatype.php.

References $DIC, $ilDB, $query, ilDclFieldTypePlugin\getPluginId(), and ilDclFieldTypePlugin\isPluginDatatype().

Referenced by ilDclFieldEditGUI\__construct(), ilDclFieldListTableGUI\fillRowFromObject(), ilDclCache\getDatatype(), ilDclTableView\getFieldSettings(), ilDataCollectionDataSet\getXmlNamespace(), ilDclFieldEditGUI\initForm(), ilDclFieldTypePlugin\install(), and ilDclTable\loadCustomFields().

116  : array
117  {
118  global $DIC;
119  $ilDB = $DIC['ilDB'];
120 
121  if (self::$datatype_cache == null) {
122  self::$datatype_cache = array();
123 
124  $query = "SELECT * FROM il_dcl_datatype ORDER BY sort";
125  $set = $ilDB->query($query);
126 
127  while ($rec = $ilDB->fetchAssoc($set)) {
128  $instance = new ilDclDatatype();
129  $instance->loadDatatype($rec);
130 
131  if (
132  $force ||
133  !ilDclFieldTypePlugin::isPluginDatatype($instance->getTitle()) ||
134  $DIC['component.repository']->hasActivatedPlugin(ilDclFieldTypePlugin::getPluginId($instance->getTitle()))
135  ) {
136  self::$datatype_cache[$rec['id']] = $instance;
137  }
138 
139  }
140  }
141 
142  return self::$datatype_cache;
143  }
static isPluginDatatype(string $datatype)
static getPluginId(string $datatype)
global $DIC
Definition: feed.php:28
$query
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDbType()

ilDclDatatype::getDbType ( )

Definition at line 90 of file class.ilDclDatatype.php.

References $dbType.

90  : string
91  {
92  return $this->dbType;
93  }

◆ getId()

ilDclDatatype::getId ( )

Definition at line 59 of file class.ilDclDatatype.php.

References $id.

Referenced by doRead().

59  : int
60  {
61  return $this->id;
62  }
+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

Definition at line 85 of file class.ilDclDatatype.php.

References $storageLocation.

85  : int
86  {
88  }

◆ getTitle()

ilDclDatatype::getTitle ( )

Definition at line 69 of file class.ilDclDatatype.php.

References $title.

69  : string
70  {
71  return $this->title;
72  }

◆ loadDatatype()

ilDclDatatype::loadDatatype ( array  $rec)
protected

Definition at line 145 of file class.ilDclDatatype.php.

References setStorageLocation(), and setTitle().

Referenced by doRead().

145  : void
146  {
147  $this->id = $rec['id'];
148  $this->dbType = $rec["ildb_type"];
149 
150  $this->setTitle($rec["title"]);
151  $this->setStorageLocation($rec["storage_location"]);
152  }
setStorageLocation(int $a_id)
Set Storage Location.
setTitle(string $a_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStorageLocation()

ilDclDatatype::setStorageLocation ( int  $a_id)

Set Storage Location.

Definition at line 77 of file class.ilDclDatatype.php.

Referenced by loadDatatype().

77  : void
78  {
79  $this->storageLocation = $a_id;
80  }
+ Here is the caller graph for this function:

◆ setTitle()

ilDclDatatype::setTitle ( string  $a_title)

Definition at line 64 of file class.ilDclDatatype.php.

Referenced by loadDatatype().

64  : void
65  {
66  $this->title = $a_title;
67  }
+ Here is the caller graph for this function:

Field Documentation

◆ $datatype_cache

array ilDclDatatype::$datatype_cache = []
static

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

◆ $dbType

string ilDclDatatype::$dbType
protected

Definition at line 41 of file class.ilDclDatatype.php.

Referenced by getDbType().

◆ $id

int ilDclDatatype::$id = 0
protected

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

Referenced by getId().

◆ $storageLocation

int ilDclDatatype::$storageLocation = 0
protected

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

Referenced by getStorageLocation().

◆ $title

string ilDclDatatype::$title = ""
protected

Definition at line 39 of file class.ilDclDatatype.php.

Referenced by getTitle().

◆ INPUTFORMAT_BOOLEAN

const ilDclDatatype::INPUTFORMAT_BOOLEAN = 4

Definition at line 25 of file class.ilDclDatatype.php.

◆ INPUTFORMAT_DATE_SELECTION

const ilDclDatatype::INPUTFORMAT_DATE_SELECTION = 15

Definition at line 36 of file class.ilDclDatatype.php.

◆ INPUTFORMAT_DATETIME

◆ INPUTFORMAT_FILE

◆ INPUTFORMAT_FORMULA

const ilDclDatatype::INPUTFORMAT_FORMULA = 11

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

◆ INPUTFORMAT_ILIAS_REF

const ilDclDatatype::INPUTFORMAT_ILIAS_REF = 8

◆ INPUTFORMAT_MOB

◆ INPUTFORMAT_NONE

const ilDclDatatype::INPUTFORMAT_NONE = 0

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

Referenced by ilDclRecordEditGUI\setFormValues().

◆ INPUTFORMAT_NUMBER

◆ INPUTFORMAT_PLUGIN

const ilDclDatatype::INPUTFORMAT_PLUGIN = 12

◆ INPUTFORMAT_RATING

const ilDclDatatype::INPUTFORMAT_RATING = 7

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

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

Definition at line 31 of file class.ilDclDatatype.php.

Referenced by ilDataCollectionDataSet\getXmlNamespace().

◆ INPUTFORMAT_TEXT

◆ INPUTFORMAT_TEXT_SELECTION

const ilDclDatatype::INPUTFORMAT_TEXT_SELECTION = 14

Definition at line 35 of file class.ilDclDatatype.php.


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