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';
8 require_once(
"./Services/Link/classes/class.ilLink.php");
9 require_once(
"./Modules/DataCollection/classes/class.ilDataCollectionImporter.php");
34 parent::__construct($record, $field);
36 $this->dcl_obj_id = $dclTable->getObjId();
53 if($ref_record_field) {
54 $exp_value = $ref_record_field->getExportValue();
55 $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);
80 $value = parent::getValueFromExcel($excel,
$row, $col);
84 $has_value = count(
$value);
90 if (!$has_value &&
$old) {
93 return array(
'warning' => $warning);
107 $slicedStrings = explode(
", ", $stringValues);
108 $slicedReferences =
array();
110 for($i = 0; $i < count($slicedStrings); $i++) {
113 $searchString = implode(array_slice($slicedStrings, $resolved, $i - $resolved + 1));
115 $slicedReferences[] = $ref;
122 $searchString = $slicedStrings[$i];
124 $slicedReferences[] = $ref;
129 return $slicedReferences;
142 foreach ($table->getRecords() as
$record) {
145 if (is_array($record_value) && !is_array(
$value)) {
146 $record_value = array_shift($record_value);
148 if ($record_value ==
$value) {
161 if ($field_clone && $record_clone) {
163 $clone_reference = $record_field_clone->getValue();
165 if ($reference_record) {
166 $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)
getReferenceFromValue($value)