31 $this->dcl_obj_id = $dclTable->getObjId();
49 $exp_value = $ref_record_field->getExportValue();
50 $names[] = is_array($exp_value) ? array_shift($exp_value) : $exp_value;
54 return implode(
'; ', $names);
58 $exp_value = $ref_record_field->getExportValue();
60 return (is_array($exp_value) ? array_shift($exp_value) : $exp_value);
69 $value = parent::getValueFromExcel($excel, $row, $col);
73 $has_value = count(
$value);
79 if (!$has_value && $old) {
83 return [
'warning' => $warning];
97 $delimiter = strpos($stringValues,
'; ') ?
'; ' :
', ';
98 $slicedStrings = explode($delimiter, $stringValues);
99 $slicedReferences = [];
101 for (
$i = 0;
$i < count($slicedStrings);
$i++) {
104 $searchString = implode(array_slice($slicedStrings, $resolved,
$i - $resolved + 1));
106 $slicedReferences[] = $ref;
113 $searchString = $slicedStrings[
$i];
115 $slicedReferences[] = $ref;
120 return $slicedReferences;
128 foreach ($table->getRecords() as
$record) {
131 if (is_array($record_value) && !is_array(
$value)) {
132 $record_value = array_shift($record_value);
134 if ($record_value ==
$value) {
147 if ($field_clone && $record_clone) {
149 $clone_references = $record_field_clone->getValue();
152 if (is_array($clone_references)) {
153 foreach ($clone_references as $clone_reference) {
158 } elseif (!is_null($temp_value = $this->
getCloneRecordId($clone_references))) {
170 if ($reference_record) {
171 return (
string) $reference_record->getId();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValueFromExcel(ilExcel $excel, int $row, int $col)
setValue($value, bool $omit_parsing=false)
Set value for record field.
static getFieldCache(int $field_id=0)
getTableId()
Get table id.
getRecordField(int $field_id)
static getTableCache(int $table_id=null)
doUpdate()
Update object in database.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
getReferencesFromString(string $stringValues)
This method tries to get as many valid references out of a string separated by commata.
static getRecordCache(?int $record_id)
ilDclBaseFieldModel $field
getCloneRecordId(?string $clone_reference)
__construct(Container $dic, ilPlugin $plugin)
static getCloneOf(int $id, string $type)
static getExcelCharForInteger(int $int)
static getRecordFieldCache(object $record, object $field)
ilDclBaseRecordModel $record
getReferenceFromValue($value)