4require_once 
'./Modules/DataCollection/exceptions/class.ilDclInputException.php';
 
   93        $query = 
"SELECT * FROM il_dcl_record_field WHERE field_id = " . $this->db->quote($this->
getField()->
getId(), 
"integer") . 
" AND record_id = " 
   95        $set = $this->db->query(
$query);
 
   96        $rec = $this->db->fetchAssoc($set);
 
   97        $this->
id = $rec[
'id'];
 
  108        $id = $this->db->nextId(
"il_dcl_record_field");
 
  109        $query = 
"INSERT INTO il_dcl_record_field (id, record_id, field_id) VALUES (" . $this->db->quote(
$id, 
"integer") . 
", " 
  111        $this->db->manipulate(
$query);
 
  122        $datatype = $this->
getField()->getDatatype();
 
  123        $storage_location = ($this->
getField()->getStorageLocationOverride() !== 
null) ? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
 
  125        if ($storage_location != 0) {
 
  126            $query = 
"DELETE FROM il_dcl_stloc" . $storage_location . 
"_value WHERE record_field_id = " 
  127                . $this->db->quote($this->
id, 
"integer");
 
  128            $this->db->manipulate(
$query);
 
  130            $next_id = $this->db->nextId(
"il_dcl_stloc" . $storage_location . 
"_value");
 
  133            if ($storage_location == 3 && (is_null($this->value) || empty($this->value))) {
 
  134                $this->value = 
'0000-00-00 00:00:00';
 
  139            if ($this->
getId() == 0) {
 
  143            $insert_params = array(
 
  144                "value" => array($datatype->getDbType(), 
$value),
 
  145                "record_field_id" => array(
"integer", $this->
getId()),
 
  146                "id" => array(
"integer", $next_id),
 
  149            $this->db->insert(
"il_dcl_stloc" . $storage_location . 
"_value", $insert_params);
 
  157    public function delete()
 
  159        $datatype = $this->
getField()->getDatatype();
 
  160        $storage_location = ($this->
getField()->getStorageLocationOverride() !== 
null) ? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
 
  162        if ($storage_location != 0) {
 
  163            $query = 
"DELETE FROM il_dcl_stloc" . $storage_location . 
"_value WHERE record_field_id = " 
  164                . $this->db->quote($this->
id, 
"integer");
 
  165            $this->db->manipulate(
$query);
 
  168        $query2 = 
"DELETE FROM il_dcl_record_field WHERE id = " . $this->db->quote($this->
id, 
"integer");
 
  169        $this->db->manipulate($query2);
 
  219        $deserialize = json_decode(
$value, 
true);
 
  220        if (is_array($deserialize)) {
 
  237        if (!$omit_parsing) {
 
  241            if ($tmp !== 
false) {
 
  354            $confirmation->
addHiddenItem(
'field_' . $this->field->getId(), $this->getValue());
 
  383        if ($this->value === 
null) {
 
  384            $datatype = $this->
getField()->getDatatype();
 
  386            $storage_location = ($this->
getField()->getStorageLocationOverride() !== 
null) ? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
 
  387            if ($storage_location != 0) {
 
  388                $query = 
"SELECT * FROM il_dcl_stloc" . $storage_location . 
"_value WHERE record_field_id = " 
  389                    . $this->db->quote($this->
id, 
"integer");
 
  391                $set = $this->db->query(
$query);
 
  392                $rec = $this->db->fetchAssoc($set);
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
addHiddenItem($a_post_var, $a_value)
Add hidden item.
Class ilDclBaseFieldModel.
Class ilDclBaseFieldModel.
addHiddenItemsToConfirmation(ilConfirmationGUI &$confirmation)
getSortingValue($link=true)
getValueFromExcel($excel, $row, $col)
getRecordRepresentation()
setRecordRepresentation($record_representation)
deserializeData($value)
Deserialize data before applying to field.
parseValue($value)
Function to parse incoming data from form input value $value.
parseExportValue($value)
Function to parse incoming data from form input value $value.
fillExcelExport(ilExcel $worksheet, &$row, &$col)
parseSortingValue($value, $link=true)
Returns sortable value for the specific field-types.
doCreate()
Creates an Id and a database entry.
doUpdate()
Update object in database.
serializeData($value)
Serialize data before storing to db.
setValue($value, $omit_parsing=false)
Set value for record field.
getValueForRepresentation()
doRead()
Read object data from database.
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
setFieldRepresentation($field_representation)
cloneStructure(ilDclBaseRecordFieldModel $old_record_field)
loadValue()
Load the value.
Class ilDclBaseRecordModel.
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
if(isset($_POST['submit'])) $form