5 require_once
'./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordFieldModel.php';
6 require_once
'./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseRecordModel.php';
7 require_once
'./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseFieldModel.php';
34 parent::__construct($record, $field);
36 $this->dcl_obj_id = $dclTable->getObjId();
54 if ($ref_record_field) {
55 $exp_value = $ref_record_field->getExportValue();
56 $names[] = is_array($exp_value) ? array_shift($exp_value) : $exp_value;
60 return implode(
'; ',
$names);
66 if ($ref_record_field) {
67 $exp_value = $ref_record_field->getExportValue();
70 return (is_array($exp_value) ? array_shift($exp_value) : $exp_value);
81 $value = parent::getValueFromExcel($excel,
$row, $col);
85 $has_value = count(
$value);
91 if (!$has_value &&
$old) {
109 $delimiter = strpos($stringValues,
'; ') ?
'; ' :
', ';
110 $slicedStrings = explode(
$delimiter, $stringValues);
111 $slicedReferences =
array();
113 for (
$i = 0;
$i < count($slicedStrings);
$i++) {
116 $searchString = implode(array_slice($slicedStrings, $resolved,
$i - $resolved + 1));
118 $slicedReferences[] = $ref;
125 $searchString = $slicedStrings[
$i];
127 $slicedReferences[] = $ref;
132 return $slicedReferences;
149 if (is_array($record_value) && !is_array(
$value)) {
150 $record_value = array_shift($record_value);
152 if ($record_value ==
$value) {
166 if ($field_clone && $record_clone) {
168 $clone_reference = $record_field_clone->getValue();
170 if ($reference_record) {
171 $this->
setValue($reference_record->getId());
Class ilDclBaseFieldModel.
static getCloneOf($id, $type)
getValueFromExcel($excel, $row, $col)
Class ilDclBaseFieldModel.
static getFieldCache($field_id=0)
setValue($value, $omit_parsing=false)
Set value for record field.
static getTableCache($table_id=0)
doUpdate()
Update object in database.
getReferencesFromString($stringValues)
This method tries to get as many valid references out of a string separated by commata.
static getRecordCache($record_id=0)
Class ilDclBaseFieldModel.
Create styles array
The data for the language used.
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
static getRecordFieldCache($record, $field)
Class ilDclBaseRecordModel.
static getExcelCharForInteger($int)
if(empty($password)) $table
getReferenceFromValue($value)