ILIAS  release_7 Revision v7.30-3-g800a261c036
ilDclDefaultValueFactory Class Reference
+ Collaboration diagram for ilDclDefaultValueFactory:

Public Member Functions

 create ($data_type_id)
 

Data Fields

const STORAGE_LOCATION_MAPPING
 

Detailed Description

Definition at line 3 of file class.ilDclDefaultValueFactory.php.

Member Function Documentation

◆ create()

ilDclDefaultValueFactory::create (   $data_type_id)
Returns
ilDclTableViewBaseDefaultValue

Definition at line 14 of file class.ilDclDefaultValueFactory.php.

14 {
15 $storage_location = ilDclCache::getDatatype($data_type_id)->getStorageLocation();
16 $class = self::STORAGE_LOCATION_MAPPING[$storage_location];
17 return new $class();
18
19 // switch ($storage_location) {
20 // case 1:
21 // return new ilDclTableViewTextDefaultValue();
22 // break;
23 // case 2:
24 // return new ilDclTableViewNumberDefaultValue();
25 // break;
26 // case 3:
27 // return new ilDclTableViewDateDefaultValue();
28 // break;
29 // }
30 }
static getDatatype($datatyp_id)
Get cached datatypes.

References ilDclCache\getDatatype().

+ Here is the call graph for this function:

Field Documentation

◆ STORAGE_LOCATION_MAPPING

const ilDclDefaultValueFactory::STORAGE_LOCATION_MAPPING
Initial value:
= [
1 => ilDclTableViewTextDefaultValue::class,
2 => ilDclTableViewNumberDefaultValue::class,
3 => ilDclTableViewDateDefaultValue::class
]

Definition at line 5 of file class.ilDclDefaultValueFactory.php.

Referenced by ilDclTableViewBaseDefaultValue\findAll(), and ilDclTableViewBaseDefaultValue\findSingle().


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