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.

public

Parameters
integerdatatype_id

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

References doRead().

70  {
71  if ($a_id != 0) {
72  $this->id = $a_id;
73  $this->doRead();
74  }
75  }
doRead()
Read Datatype.
+ 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.

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

Referenced by __construct().

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  }
global $DIC
Definition: saml.php:7
getId()
Get field id.
$query
global $ilDB
+ 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.

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

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

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 
182  return self::$datatype_cache;
183  }
global $DIC
Definition: saml.php:7
$query
Create styles array
The data for the language used.
Class ilDclDatatype.
global $ilDB
+ Here is the caller graph for this function:

◆ getDbType()

ilDclDatatype::getDbType ( )

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

References $dbType.

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

◆ getId()

ilDclDatatype::getId ( )

Get field id.

Returns
int

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

References $id.

Referenced by doRead().

84  {
85  return $this->id;
86  }
+ 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.

References $storageLocation.

128  {
129  return $this->storageLocation;
130  }

◆ getTitle()

ilDclDatatype::getTitle ( )

Get title.

Returns
string

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

References $title.

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

◆ loadDatatype()

ilDclDatatype::loadDatatype (   $rec)
protected

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

References setStorageLocation(), and setTitle().

Referenced by doRead().

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

Referenced by loadDatatype().

117  {
118  $this->storageLocation = $a_id;
119  }
+ 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.

Referenced by loadDatatype().

95  {
96  $this->title = $a_title;
97  }
+ 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.

◆ $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.

Referenced by ilDclTable\getFirstTableViewId().

◆ INPUTFORMAT_ILIAS_REF

◆ 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.

Referenced by ilDclTable\getFirstTableViewId().

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

◆ 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: