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

Public Member Functions

 __construct (int $a_id=0)
 Constructor 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 public.

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

References doRead().

55  {
56  if ($a_id != 0) {
57  $this->id = $a_id;
58  $this->doRead();
59  }
60  }
doRead()
Read Datatype.
+ 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.

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

Referenced by __construct().

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

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

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

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 
140  return self::$datatype_cache;
141  }
static isPluginDatatype(string $datatype)
static getPluginId(string $datatype)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
+ 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.

References $id.

Referenced by doRead().

62  : int
63  {
64  return $this->id;
65  }
+ Here is the caller graph for this function:

◆ getStorageLocation()

ilDclDatatype::getStorageLocation ( )

Get Storage Location.

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

References $storageLocation.

88  : int
89  {
91  }

◆ getTitle()

ilDclDatatype::getTitle ( )

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

References $title.

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

◆ loadDatatype()

ilDclDatatype::loadDatatype ( array  $rec)
protected

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

References setStorageLocation(), and setTitle().

Referenced by doRead().

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)
+ 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.

Referenced by loadDatatype().

80  : void
81  {
82  $this->storageLocation = $a_id;
83  }
+ Here is the caller graph for this function:

◆ setTitle()

ilDclDatatype::setTitle ( string  $a_title)

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

Referenced by loadDatatype().

67  : void
68  {
69  $this->title = $a_title;
70  }
+ 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.

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

◆ 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

◆ INPUTFORMAT_MOB

◆ INPUTFORMAT_NONE

const ilDclDatatype::INPUTFORMAT_NONE = 0

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

Referenced by ilDclRecordEditGUI\setFormValues().

◆ INPUTFORMAT_NUMBER

◆ INPUTFORMAT_RATING

const ilDclDatatype::INPUTFORMAT_RATING = 7

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

◆ INPUTFORMAT_REFERENCE

◆ INPUTFORMAT_REFERENCELIST

const ilDclDatatype::INPUTFORMAT_REFERENCELIST = 10

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

Referenced by ilDataCollectionDataSet\getXmlNamespace().

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