19 declare(strict_types=1);
28 if ($this->
getField()->isMulti() && !is_array($this->value)) {
31 if (!$this->
getField()->isMulti() && is_array($this->value)) {
32 return array_shift($this->value);
45 return implode(
"; ", $values);
50 $string = parent::getValueFromExcel($excel, $row, $col);
54 $has_value = count($string);
60 if (!$has_value && $old) {
64 return [
'warning' => $warning];
80 $delimiter = strpos($stringValues,
'; ') ?
'; ' :
', ';
81 $slicedStrings = explode($delimiter, $stringValues);
82 $slicedReferences = [];
84 for ($i = 0; $i < count($slicedStrings); $i++) {
85 $searchString = implode(array_slice($slicedStrings, $resolved, $i - $resolved + 1));
87 $slicedReferences[] = $ref;
92 $searchString = $slicedStrings[$i];
94 $slicedReferences[] = $ref;
99 return $slicedReferences;
104 foreach ($this->
getField()->getProperty($this->field::PROP_SELECTION_OPTIONS) as
$id =>
$value) {
getValueFromString(string $string)
static getValues(int $field_id, $opt_ids)
getMultipleValuesFromString(string $stringValues)
Copied from reference field and slightly adjusted.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getValueFromExcel(ilExcel $excel, int $row, int $col)
static getExcelCharForInteger(int $int)