ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDclDatatype Class Reference
+ Collaboration diagram for ilDclDatatype:

Public Member Functions

 __construct (int $a_id=0)
 Constructor @access public. More...
 
 getId ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setStorageLocation (int $a_id)
 Set Storage Location. More...
 
 getStorageLocation ()
 Get Storage Location. More...
 
 doRead ()
 Read Datatype. More...
 

Static Public Member Functions

static getAllDatatype (bool $force=false)
 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_DATE = 5
 
const INPUTFORMAT_FILEUPLOAD = 6
 
const INPUTFORMAT_RATING = 7
 
const INPUTFORMAT_ILIAS_REF = 8
 
const INPUTFORMAT_MOB = 9
 
const INPUTFORMAT_REFERENCELIST = 10
 
const INPUTFORMAT_FORMULA = 11
 
const INPUTFORMAT_TEXT_SELECTION = 14
 
const INPUTFORMAT_DATE_SELECTION = 15
 
const INPUTFORMAT_FILE = 16
 
const INPUTFORMAT_COPY = 17
 
const INPUTFORMAT_DATETIME = 18
 
const INPUTFORMAT_DATETIME_SELECTION = 19
 

Static Public Attributes

static array $datatype_cache = []
 

Protected Member Functions

 loadDatatype (array $rec)
 

Protected Attributes

int $id = 0
 
string $title = "unknown"
 
int $storageLocation = 0
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilDclDatatype::__construct ( int  $a_id = 0)

Constructor @access public.

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

55 {
56 if ($a_id != 0) {
57 $this->id = $a_id;
58 $this->doRead();
59 }
60 }
doRead()
Read Datatype.

References doRead().

+ Here is the call graph for this function:

Member Function Documentation

◆ doRead()

ilDclDatatype::doRead ( )

Read Datatype.

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

96 : void
97 {
98 global $DIC;
99 $ilDB = $DIC['ilDB'];
100
101 $query = "SELECT * FROM il_dcl_datatype WHERE id = " . $ilDB->quote(
102 $this->getId(),
103 "integer"
104 ) . " ORDER BY sort";
105 $set = $ilDB->query($query);
106 $rec = $ilDB->fetchAssoc($set);
107
108 $this->loadDatatype($rec);
109 }
loadDatatype(array $rec)
global $DIC
Definition: shib_login.php:26

References $DIC, $ilDB, 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 ( bool  $force = false)
static

Get all possible Datatypes.

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

114 : array
115 {
116 global $DIC;
117 $ilDB = $DIC['ilDB'];
118
119 if (self::$datatype_cache == null) {
120 self::$datatype_cache = [];
121
122 $query = "SELECT * FROM il_dcl_datatype ORDER BY sort";
123 $set = $ilDB->query($query);
124
125 while ($rec = $ilDB->fetchAssoc($set)) {
126 $instance = new ilDclDatatype();
127 $instance->loadDatatype($rec);
128
129 if (
130 $force ||
131 !ilDclFieldTypePlugin::isPluginDatatype($instance->getTitle()) ||
132 $DIC['component.repository']->hasActivatedPlugin(ilDclFieldTypePlugin::getPluginId($instance->getTitle()))
133 ) {
134 self::$datatype_cache[$rec['id']] = $instance;
135 }
136
137 }
138 }
139
141 }
static array $datatype_cache
static isPluginDatatype(string $datatype)
static getPluginId(string $datatype)

References $datatype_cache, $DIC, $ilDB, ilDclFieldTypePlugin\getPluginId(), and ilDclFieldTypePlugin\isPluginDatatype().

Referenced by ilDclFieldEditGUI\__construct(), ilDclFieldListTableGUI\fillRowFromObject(), ilDclCache\getDatatype(), ilDclTableView\getFieldSettings(), ilDclFieldEditGUI\initForm(), ilDclFieldTypePlugin\install(), and ilDclTable\loadCustomFields().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getId()

ilDclDatatype::getId ( )

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

62 : int
63 {
64 return $this->id;
65 }

References $id.

Referenced by doRead().

+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

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

88 : int
89 {
91 }

References $storageLocation.

◆ getTitle()

ilDclDatatype::getTitle ( )

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

72 : string
73 {
74 return $this->title;
75 }

References $title.

◆ loadDatatype()

ilDclDatatype::loadDatatype ( array  $rec)
protected

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

143 : void
144 {
145 $this->id = $rec['id'];
146
147 $this->setTitle($rec["title"]);
148 $this->setStorageLocation($rec["storage_location"]);
149 }
setStorageLocation(int $a_id)
Set Storage Location.
setTitle(string $a_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 ( int  $a_id)

Set Storage Location.

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

80 : void
81 {
82 $this->storageLocation = $a_id;
83 }

Referenced by loadDatatype().

+ Here is the caller graph for this function:

◆ setTitle()

ilDclDatatype::setTitle ( string  $a_title)

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

67 : void
68 {
69 $this->title = $a_title;
70 }

Referenced by loadDatatype().

+ Here is the caller graph for this function:

Field Documentation

◆ $datatype_cache

array ilDclDatatype::$datatype_cache = []
static

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

Referenced by getAllDatatype().

◆ $id

int ilDclDatatype::$id = 0
protected

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

Referenced by getId().

◆ $storageLocation

int ilDclDatatype::$storageLocation = 0
protected

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

Referenced by getStorageLocation().

◆ $title

string ilDclDatatype::$title = "unknown"
protected

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

Referenced by getTitle().

◆ INPUTFORMAT_BOOLEAN

const ilDclDatatype::INPUTFORMAT_BOOLEAN = 4

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

◆ INPUTFORMAT_COPY

const ilDclDatatype::INPUTFORMAT_COPY = 17

◆ INPUTFORMAT_DATE

◆ INPUTFORMAT_DATE_SELECTION

const ilDclDatatype::INPUTFORMAT_DATE_SELECTION = 15

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

Referenced by ilDataCollectionDBUpdateSteps11\step_1().

◆ INPUTFORMAT_DATETIME

const ilDclDatatype::INPUTFORMAT_DATETIME = 18

◆ INPUTFORMAT_DATETIME_SELECTION

const ilDclDatatype::INPUTFORMAT_DATETIME_SELECTION = 19

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

Referenced by ilDataCollectionDBUpdateSteps11\step_3().

◆ INPUTFORMAT_FILE

const ilDclDatatype::INPUTFORMAT_FILE = 16

◆ INPUTFORMAT_FILEUPLOAD

◆ INPUTFORMAT_FORMULA

const ilDclDatatype::INPUTFORMAT_FORMULA = 11

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

◆ INPUTFORMAT_ILIAS_REF

const ilDclDatatype::INPUTFORMAT_ILIAS_REF = 8

◆ INPUTFORMAT_MOB

◆ INPUTFORMAT_NONE

const ilDclDatatype::INPUTFORMAT_NONE = 0

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

Referenced by ilDclRecordEditGUI\setFormValues().

◆ INPUTFORMAT_NUMBER

const ilDclDatatype::INPUTFORMAT_NUMBER = 1

◆ INPUTFORMAT_RATING

const ilDclDatatype::INPUTFORMAT_RATING = 7

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

◆ INPUTFORMAT_REFERENCE

const ilDclDatatype::INPUTFORMAT_REFERENCE = 3

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

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

◆ INPUTFORMAT_TEXT

◆ INPUTFORMAT_TEXT_SELECTION

const ilDclDatatype::INPUTFORMAT_TEXT_SELECTION = 14

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

Referenced by ilDataCollectionDBUpdateSteps11\step_1().


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