4 require_once
'./Modules/DataCollection/exceptions/class.ilDclInputException.php';
95 $query =
"SELECT * FROM il_dcl_record_field WHERE field_id = " . $this->db->quote($this->
getField()->
getId(),
"integer") .
" AND record_id = " 97 $set = $this->db->query(
$query);
98 $rec = $this->db->fetchAssoc($set);
99 $this->
id = $rec[
'id'];
110 $id = $this->db->nextId(
"il_dcl_record_field");
111 $query =
"INSERT INTO il_dcl_record_field (id, record_id, field_id) VALUES (" . $this->db->quote(
$id,
"integer") .
", " 113 $this->db->manipulate(
$query);
124 $datatype = $this->
getField()->getDatatype();
125 $storage_location = ($this->
getField()->getStorageLocationOverride() !== null)? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
127 if ($storage_location != 0) {
128 $query =
"DELETE FROM il_dcl_stloc" . $storage_location .
"_value WHERE record_field_id = " 129 . $this->db->quote($this->
id,
"integer");
130 $this->db->manipulate(
$query);
132 $next_id = $this->db->nextId(
"il_dcl_stloc" . $storage_location .
"_value");
135 if ($storage_location == 3 && (is_null($this->value) || empty($this->value))) {
136 $this->value =
'0000-00-00 00:00:00';
141 if ($this->
getId() == 0) {
145 $insert_params =
array(
147 "record_field_id" =>
array(
"integer", $this->
getId()),
148 "id" =>
array(
"integer", $next_id )
151 $this->db->insert(
"il_dcl_stloc" . $storage_location .
"_value", $insert_params);
159 public function delete()
161 $datatype = $this->
getField()->getDatatype();
162 $storage_location = ($this->
getField()->getStorageLocationOverride() !== null)? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
164 if ($storage_location != 0) {
165 $query =
"DELETE FROM il_dcl_stloc" . $storage_location .
"_value WHERE record_field_id = " 166 . $this->db->quote($this->
id,
"integer");
167 $this->db->manipulate(
$query);
170 $query2 =
"DELETE FROM il_dcl_record_field WHERE id = " . $this->db->quote($this->
id,
"integer");
171 $this->db->manipulate($query2);
217 $deserialize = json_decode(
$value,
true);
218 if (is_array($deserialize)) {
233 if (!$omit_parsing) {
237 if ($tmp !==
false) {
360 if ($this->value === null) {
361 $datatype = $this->
getField()->getDatatype();
363 $storage_location = ($this->
getField()->getStorageLocationOverride() !== null)? $this->
getField()->getStorageLocationOverride() : $datatype->getStorageLocation();
364 if ($storage_location != 0) {
365 $query =
"SELECT * FROM il_dcl_stloc" . $storage_location .
"_value WHERE record_field_id = " 366 . $this->db->quote($this->
id,
"integer");
368 $set = $this->db->query(
$query);
369 $rec = $this->db->fetchAssoc($set);
parseValue($value)
Function to parse incoming data from form input value $value.
Class ilDclBaseFieldModel.
Class ilDclBaseFieldModel.
addHiddenItem($a_post_var, $a_value)
Add hidden item.
setFieldRepresentation($field_representation)
parseSortingValue($value, $link=true)
Returns sortable value for the specific field-types.
setValue($value, $omit_parsing=false)
Set value for record field.
getValueForRepresentation()
getValueFromExcel($excel, $row, $col)
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
doRead()
Read object data from database.
doCreate()
Creates an Id and a database entry.
cloneStructure(ilDclBaseRecordFieldModel $old_record_field)
deserializeData($value)
Deserialize data before applying to field.
parseExportValue($value)
Function to parse incoming data from form input value $value.
if(isset($_POST['submit'])) $form
doUpdate()
Update object in database.
fillExcelExport(ilExcel $worksheet, &$row, &$col)
addHiddenItemsToConfirmation(ilConfirmationGUI &$confirmation)
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
serializeData($value)
Serialize data before storing to db.
loadValue()
Load the value.
Create styles array
The data for the language used.
Class ilDclBaseRecordModel.
getRecordRepresentation()
setRecordRepresentation($record_representation)
Confirmation screen class.
getSortingValue($link=true)