ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 65 of file class.ilDclDatatype.php.

References doRead().

66  {
67  if ($a_id != 0) {
68  $this->id = $a_id;
69  $this->doRead();
70  }
71  }
doRead()
Read Datatype.
+ 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.

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

Referenced by __construct().

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

References $DIC, $ilDB, and $query.

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

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 
178  return self::$datatype_cache;
179  }
global $DIC
Definition: saml.php:7
$query
Class ilDclDatatype.
global $ilDB
+ Here is the caller graph for this function:

◆ getDbType()

ilDclDatatype::getDbType ( )

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

References $dbType.

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

◆ getId()

ilDclDatatype::getId ( )

Get field id.

Returns
int

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

References $id.

Referenced by doRead().

80  {
81  return $this->id;
82  }
+ 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.

References $storageLocation.

124  {
125  return $this->storageLocation;
126  }

◆ getTitle()

ilDclDatatype::getTitle ( )

Get title.

Returns
string

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

References $title.

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

◆ loadDatatype()

ilDclDatatype::loadDatatype (   $rec)
protected

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

References setStorageLocation(), and setTitle().

Referenced by doRead().

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

Referenced by loadDatatype().

113  {
114  $this->storageLocation = $a_id;
115  }
+ 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.

Referenced by loadDatatype().

91  {
92  $this->title = $a_title;
93  }
+ 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.

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

Referenced by ilDclTable\getFirstTableViewId().

◆ INPUTFORMAT_ILIAS_REF

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

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


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