33 $this->dcl_obj_id = $dclTable->getObjId();
52 if ($ref_record_field) {
53 $exp_value = $ref_record_field->getExportValue();
54 $names[] = is_array($exp_value) ? array_shift($exp_value) : $exp_value;
59 return implode(
'; ', $names);
65 if ($ref_record_field) {
66 $exp_value = $ref_record_field->getExportValue();
69 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) {
95 return array(
'warning' => $warning);
113 $delimiter = strpos($stringValues,
'; ') ?
'; ' :
', ';
114 $slicedStrings = explode($delimiter, $stringValues);
115 $slicedReferences = array();
117 for (
$i = 0;
$i < count($slicedStrings);
$i++) {
120 $searchString = implode(array_slice($slicedStrings, $resolved,
$i - $resolved + 1));
122 $slicedReferences[] = $ref;
129 $searchString = $slicedStrings[
$i];
131 $slicedReferences[] = $ref;
137 return $slicedReferences;
152 foreach ($table->getRecords() as
$record) {
155 if (is_array($record_value) && !is_array(
$value)) {
156 $record_value = array_shift($record_value);
158 if ($record_value ==
$value) {
172 if ($field_clone && $record_clone) {
174 $clone_reference = $record_field_clone->getValue();
176 if ($reference_record) {
177 $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.
__construct(ilDclBaseRecordModel $record, ilDclBaseFieldModel $field)
static getRecordFieldCache($record, $field)
Class ilDclBaseRecordModel.
__construct(Container $dic, ilPlugin $plugin)
static getExcelCharForInteger($int)
getReferenceFromValue($value)