PropertyModifierHook: allow modifiers to deal...
...with arrays refs #12236
This commit is contained in:
parent
a64e36b111
commit
a4813e8046
|
@ -28,6 +28,11 @@ abstract class PropertyModifierHook
|
|||
return $class;
|
||||
}
|
||||
|
||||
public function hasArraySupport()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setTargetProperty($property)
|
||||
{
|
||||
$this->targetProperty = $property;
|
||||
|
|
|
@ -102,7 +102,7 @@ class ImportSource extends DbObjectWithSettings
|
|||
|
||||
$target = $mod->getTargetProperty($key);
|
||||
|
||||
if (is_array($row->$key)) {
|
||||
if (is_array($row->$key) && ! $mod->hasArraySupport()) {
|
||||
$new = array();
|
||||
foreach ($row->$key as $k => $v) {
|
||||
$new[$k] = $mod->transform($v);
|
||||
|
|
Loading…
Reference in New Issue