ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilDclDatatype Class Reference

Class ilDclDatatype. More...

+ Collaboration diagram for ilDclDatatype:

Public Member Functions

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

Static Public Member Functions

static getAllDatatype ()
 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_NON_EDITABLE_VALUE = 13
 

Static Public Attributes

static $datatype_cache
 

Protected Member Functions

 loadDatatype ($rec)
 

Protected Attributes

 $id
 
 $title
 
 $storageLocation
 
 $dbType
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilDclDatatype::__construct (   $a_id = 0)

Constructor.

public

Parameters
integerdatatype_id

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

References doRead().

84  {
85  if ($a_id != 0) {
86  $this->id = $a_id;
87  $this->doRead();
88  }
89  }
doRead()
Read Datatype.
+ Here is the call graph for this function:

Member Function Documentation

◆ doRead()

ilDclDatatype::doRead ( )

Read Datatype.

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

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

Referenced by __construct().

153  {
154  global $DIC;
155  $ilDB = $DIC['ilDB'];
156 
157  $query = "SELECT * FROM il_dcl_datatype WHERE id = " . $ilDB->quote($this->getId(), "integer") . " ORDER BY sort";
158  $set = $ilDB->query($query);
159  $rec = $ilDB->fetchAssoc($set);
160 
161  $this->loadDatatype($rec);
162  }
getId()
Get field id.
global $ilDB
global $DIC
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAllDatatype()

static ilDclDatatype::getAllDatatype ( )
static

Get all possible Datatypes.

Returns
array

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

References $DIC, $ilDB, $query, and array.

Referenced by ilDclFieldEditGUI\__construct(), ilDclCache\getDatatype(), and ilDclFieldEditGUI\initForm().

170  {
171  global $DIC;
172  $ilDB = $DIC['ilDB'];
173 
174  if(self::$datatype_cache == NULL) {
175  self::$datatype_cache = array();
176 
177  $query = "SELECT * FROM il_dcl_datatype ORDER BY sort";
178  $set = $ilDB->query($query);
179 
180  while ($rec = $ilDB->fetchAssoc($set)) {
181  $instance = new ilDclDatatype();
182  $instance->loadDatatype($rec);
183 
184  self::$datatype_cache[$rec['id']] = $instance;
185  }
186  }
187 
188  return self::$datatype_cache;
189  }
Create styles array
The data for the language used.
Class ilDclDatatype.
global $ilDB
global $DIC
+ Here is the caller graph for this function:

◆ getDbType()

ilDclDatatype::getDbType ( )

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

References $dbType.

145  {
146  return $this->dbType;
147  }

◆ getId()

ilDclDatatype::getId ( )

Get field id.

Returns
int

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

References $id.

Referenced by doRead().

97  {
98  return $this->id;
99  }
+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

Returns
int

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

References $storageLocation.

137  {
138  return $this->storageLocation;
139  }

◆ getTitle()

ilDclDatatype::getTitle ( )

Get title.

Returns
string

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

References $title.

117  {
118  return $this->title;
119  }

◆ loadDatatype()

ilDclDatatype::loadDatatype (   $rec)
protected

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

References setStorageLocation(), and setTitle().

Referenced by doRead().

191  {
192  $this->id = $rec['id'];
193  $this->dbType = $rec["ildb_type"];
194 
195  $this->setTitle($rec["title"]);
196  $this->setStorageLocation($rec["storage_location"]);
197  }
setTitle($a_title)
Set title.
setStorageLocation($a_id)
Set Storage Location.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStorageLocation()

ilDclDatatype::setStorageLocation (   $a_id)

Set Storage Location.

Parameters
int$a_id

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

Referenced by loadDatatype().

127  {
128  $this->storageLocation = $a_id;
129  }
+ Here is the caller graph for this function:

◆ setTitle()

ilDclDatatype::setTitle (   $a_title)

Set title.

Parameters
string$a_title

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

Referenced by loadDatatype().

107  {
108  $this->title = $a_title;
109  }
+ Here is the caller graph for this function:

Field Documentation

◆ $datatype_cache

ilDclDatatype::$datatype_cache
static

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

◆ $dbType

ilDclDatatype::$dbType
protected

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

Referenced by getDbType().

◆ $id

ilDclDatatype::$id
protected

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

Referenced by getId().

◆ $storageLocation

ilDclDatatype::$storageLocation
protected

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

Referenced by getStorageLocation().

◆ $title

ilDclDatatype::$title
protected

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

Referenced by getTitle().

◆ INPUTFORMAT_BOOLEAN

const ilDclDatatype::INPUTFORMAT_BOOLEAN = 4

◆ INPUTFORMAT_DATETIME

◆ INPUTFORMAT_FILE

◆ INPUTFORMAT_FORMULA

const ilDclDatatype::INPUTFORMAT_FORMULA = 11

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

Referenced by ilDclTable\getFirstTableViewId().

◆ INPUTFORMAT_ILIAS_REF

◆ INPUTFORMAT_MOB

◆ INPUTFORMAT_NON_EDITABLE_VALUE

const ilDclDatatype::INPUTFORMAT_NON_EDITABLE_VALUE = 13

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

◆ INPUTFORMAT_NONE

const ilDclDatatype::INPUTFORMAT_NONE = 0

◆ INPUTFORMAT_NUMBER

◆ INPUTFORMAT_PLUGIN

◆ INPUTFORMAT_RATING

const ilDclDatatype::INPUTFORMAT_RATING = 7

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

Referenced by ilDclTable\getFirstTableViewId().

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

◆ INPUTFORMAT_TEXT


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