mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
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;
|
return $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function hasArraySupport()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public function setTargetProperty($property)
|
public function setTargetProperty($property)
|
||||||
{
|
{
|
||||||
$this->targetProperty = $property;
|
$this->targetProperty = $property;
|
||||||
|
@ -102,7 +102,7 @@ class ImportSource extends DbObjectWithSettings
|
|||||||
|
|
||||||
$target = $mod->getTargetProperty($key);
|
$target = $mod->getTargetProperty($key);
|
||||||
|
|
||||||
if (is_array($row->$key)) {
|
if (is_array($row->$key) && ! $mod->hasArraySupport()) {
|
||||||
$new = array();
|
$new = array();
|
||||||
foreach ($row->$key as $k => $v) {
|
foreach ($row->$key as $k => $v) {
|
||||||
$new[$k] = $mod->transform($v);
|
$new[$k] = $mod->transform($v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user