ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
 
const INPUTFORMAT_TEXT_SELECTION = 14
 
const INPUTFORMAT_DATE_SELECTION = 15
 

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.

@access public

Parameters
integerdatatype_id

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

70 {
71 if ($a_id != 0) {
72 $this->id = $a_id;
73 $this->doRead();
74 }
75 }
doRead()
Read Datatype.

References doRead().

+ Here is the call graph for this function:

Member Function Documentation

◆ doRead()

ilDclDatatype::doRead ( )

Read Datatype.

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

146 {
147 global $DIC;
148 $ilDB = $DIC['ilDB'];
149
150 $query = "SELECT * FROM il_dcl_datatype WHERE id = " . $ilDB->quote($this->getId(), "integer") . " ORDER BY sort";
151 $set = $ilDB->query($query);
152 $rec = $ilDB->fetchAssoc($set);
153
154 $this->loadDatatype($rec);
155 }
getId()
Get field id.
$query
global $DIC
Definition: saml.php:7
global $ilDB

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

Referenced by __construct().

+ 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 163 of file class.ilDclDatatype.php.

164 {
165 global $DIC;
166 $ilDB = $DIC['ilDB'];
167
168 if (self::$datatype_cache == null) {
169 self::$datatype_cache = array();
170
171 $query = "SELECT * FROM il_dcl_datatype ORDER BY sort";
172 $set = $ilDB->query($query);
173
174 while ($rec = $ilDB->fetchAssoc($set)) {
175 $instance = new ilDclDatatype();
176 $instance->loadDatatype($rec);
177
178 self::$datatype_cache[$rec['id']] = $instance;
179 }
180 }
181
183 }
Class ilDclDatatype.

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

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

+ Here is the caller graph for this function:

◆ getDbType()

ilDclDatatype::getDbType ( )

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

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

References $dbType.

◆ getId()

ilDclDatatype::getId ( )

Get field id.

Returns
int

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

84 {
85 return $this->id;
86 }

References $id.

Referenced by doRead().

+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

Returns
int

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

128 {
130 }

References $storageLocation.

◆ getTitle()

ilDclDatatype::getTitle ( )

Get title.

Returns
string

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

106 {
107 return $this->title;
108 }

References $title.

◆ loadDatatype()

ilDclDatatype::loadDatatype (   $rec)
protected

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

186 {
187 $this->id = $rec['id'];
188 $this->dbType = $rec["ildb_type"];
189
190 $this->setTitle($rec["title"]);
191 $this->setStorageLocation($rec["storage_location"]);
192 }
setStorageLocation($a_id)
Set Storage Location.
setTitle($a_title)
Set title.

References setStorageLocation(), and setTitle().

Referenced by doRead().

+ 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 116 of file class.ilDclDatatype.php.

117 {
118 $this->storageLocation = $a_id;
119 }

Referenced by loadDatatype().

+ Here is the caller graph for this function:

◆ setTitle()

ilDclDatatype::setTitle (   $a_title)

Set title.

Parameters
string$a_title

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

95 {
96 $this->title = $a_title;
97 }

Referenced by loadDatatype().

+ Here is the caller graph for this function:

Field Documentation

◆ $datatype_cache

ilDclDatatype::$datatype_cache
static

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

Referenced by getAllDatatype().

◆ $dbType

ilDclDatatype::$dbType
protected

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

Referenced by getDbType().

◆ $id

ilDclDatatype::$id
protected

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

Referenced by getId().

◆ $storageLocation

ilDclDatatype::$storageLocation
protected

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

Referenced by getStorageLocation().

◆ $title

ilDclDatatype::$title
protected

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

Referenced by getTitle().

◆ INPUTFORMAT_BOOLEAN

const ilDclDatatype::INPUTFORMAT_BOOLEAN = 4

◆ INPUTFORMAT_DATE_SELECTION

const ilDclDatatype::INPUTFORMAT_DATE_SELECTION = 15

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

◆ INPUTFORMAT_DATETIME

◆ INPUTFORMAT_FILE

◆ INPUTFORMAT_FORMULA

const ilDclDatatype::INPUTFORMAT_FORMULA = 11

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

◆ INPUTFORMAT_ILIAS_REF

const ilDclDatatype::INPUTFORMAT_ILIAS_REF = 8

◆ INPUTFORMAT_MOB

◆ INPUTFORMAT_NON_EDITABLE_VALUE

const ilDclDatatype::INPUTFORMAT_NON_EDITABLE_VALUE = 13

Definition at line 32 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 26 of file class.ilDclDatatype.php.

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

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

◆ INPUTFORMAT_TEXT

◆ INPUTFORMAT_TEXT_SELECTION

const ilDclDatatype::INPUTFORMAT_TEXT_SELECTION = 14

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


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