ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 65 of file class.ilDclDatatype.php.

66 {
67 if ($a_id != 0) {
68 $this->id = $a_id;
69 $this->doRead();
70 }
71 }
doRead()
Read Datatype.

References doRead().

+ Here is the call graph for this function:

Member Function Documentation

◆ doRead()

ilDclDatatype::doRead ( )

Read Datatype.

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

142 {
143 global $DIC;
144 $ilDB = $DIC['ilDB'];
145
146 $query = "SELECT * FROM il_dcl_datatype WHERE id = " . $ilDB->quote($this->getId(), "integer") . " ORDER BY sort";
147 $set = $ilDB->query($query);
148 $rec = $ilDB->fetchAssoc($set);
149
150 $this->loadDatatype($rec);
151 }
getId()
Get field id.
$query
global $ilDB
$DIC
Definition: xapitoken.php:46

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

160 {
161 global $DIC;
162 $ilDB = $DIC['ilDB'];
163
164 if (self::$datatype_cache == null) {
165 self::$datatype_cache = array();
166
167 $query = "SELECT * FROM il_dcl_datatype ORDER BY sort";
168 $set = $ilDB->query($query);
169
170 while ($rec = $ilDB->fetchAssoc($set)) {
171 $instance = new ilDclDatatype();
172 $instance->loadDatatype($rec);
173
174 self::$datatype_cache[$rec['id']] = $instance;
175 }
176 }
177
179 }
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 132 of file class.ilDclDatatype.php.

133 {
134 return $this->dbType;
135 }

References $dbType.

◆ getId()

ilDclDatatype::getId ( )

Get field id.

Returns
int

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

80 {
81 return $this->id;
82 }

References $id.

Referenced by doRead().

+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

Returns
int

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

124 {
126 }

References $storageLocation.

◆ getTitle()

ilDclDatatype::getTitle ( )

Get title.

Returns
string

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

102 {
103 return $this->title;
104 }

References $title.

◆ loadDatatype()

ilDclDatatype::loadDatatype (   $rec)
protected

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

183 {
184 $this->id = $rec['id'];
185 $this->dbType = $rec["ildb_type"];
186
187 $this->setTitle($rec["title"]);
188 $this->setStorageLocation($rec["storage_location"]);
189 }
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 112 of file class.ilDclDatatype.php.

113 {
114 $this->storageLocation = $a_id;
115 }

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

91 {
92 $this->title = $a_title;
93 }

Referenced by loadDatatype().

+ Here is the caller graph for this function:

Field Documentation

◆ $datatype_cache

ilDclDatatype::$datatype_cache
static

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

Referenced by getAllDatatype().

◆ $dbType

ilDclDatatype::$dbType
protected

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

Referenced by getDbType().

◆ $id

ilDclDatatype::$id
protected

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

Referenced by getId().

◆ $storageLocation

ilDclDatatype::$storageLocation
protected

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

Referenced by getStorageLocation().

◆ $title

ilDclDatatype::$title
protected

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

◆ INPUTFORMAT_DATETIME

◆ INPUTFORMAT_FILE

◆ INPUTFORMAT_FORMULA

const ilDclDatatype::INPUTFORMAT_FORMULA = 11

Definition at line 29 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 31 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 25 of file class.ilDclDatatype.php.

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

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

◆ INPUTFORMAT_TEXT

◆ INPUTFORMAT_TEXT_SELECTION

const ilDclDatatype::INPUTFORMAT_TEXT_SELECTION = 14

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


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