30        if ($this->
getField()->isMulti() && !is_array($this->value)) {
 
   33        if (!$this->
getField()->isMulti() && is_array($this->value)) {
 
   34            return (count($this->value) == 1) ? array_shift($this->value) : 
'';
 
   47        return implode(
"; ", $values);
 
   52        $string = parent::getValueFromExcel($excel, $row, $col);
 
   56            $has_value = count($string);
 
   58            $string = $this->getValueFromString($string);
 
   62        if (!$has_value && $old) {
 
   66            return [
'warning' => $warning];
 
   82        $delimiter = strpos($stringValues, 
'; ') ? 
'; ' : 
', ';
 
   83        $slicedStrings = explode($delimiter, $stringValues);
 
   84        $slicedReferences = [];
 
   86        for (
$i = 0; 
$i < count($slicedStrings); 
$i++) {
 
   89            $searchString = implode(array_slice($slicedStrings, $resolved, 
$i - $resolved + 1));
 
   90            if ($ref = $this->getValueFromString($searchString)) {
 
   91                $slicedReferences[] = $ref;
 
   98            $searchString = $slicedStrings[
$i];
 
   99            if ($ref = $this->getValueFromString($searchString)) {
 
  100                $slicedReferences[] = $ref;
 
  105        return $slicedReferences;
 
  108    protected function getValueFromString(
string $string): ?
int 
  110        $options = $this->
getField()->getProperty(static::PROP_SELECTION_OPTIONS);
 
  111        foreach ($options as $opt) {
 
  113            if ($opt->getValue() == $string) {
 
  114                return $opt->getOptId();
 
static getExcelCharForInteger(int $int)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getValues(int $field_id, $opt_ids)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
const PROP_SELECTION_OPTIONS
 
getValueFromExcel(ilExcel $excel, int $row, int $col)
 
getMultipleValuesFromString(string $stringValues)
Copied from reference field and slightly adjusted.
 
const PROP_SELECTION_TYPE