ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilDclDefaultValueFactory.php
Go to the documentation of this file.
1<?php
2
4{
6 1 => ilDclTableViewTextDefaultValue::class,
7 2 => ilDclTableViewNumberDefaultValue::class,
8 3 => ilDclTableViewDateDefaultValue::class
9 ];
10
14 public function create($data_type_id) {
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 }
31
32}
An exception for terminatinating execution or to throw for unit testing.
static getDatatype($datatyp_id)
Get cached datatypes.