parent
142e3f2c43
commit
f24276ce88
|
@ -199,6 +199,11 @@ abstract class PropertyModifierHook
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function exportSettings()
|
||||
{
|
||||
return (object) $this->settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override this method if you want to extend the settings form
|
||||
*
|
||||
|
|
|
@ -62,7 +62,7 @@ class ImportRowModifier extends DbObjectWithSettings
|
|||
$properties = $this->getProperties();
|
||||
unset($properties['id']);
|
||||
unset($properties['source_id']);
|
||||
$properties['settings'] = (object) $this->getSettings();
|
||||
$properties['settings'] = $this->getInstance()->exportSettings();
|
||||
ksort($properties);
|
||||
|
||||
return (object) $properties;
|
||||
|
|
|
@ -308,6 +308,9 @@ class ImportSource extends DbObjectWithSettings implements ExportInterface
|
|||
|
||||
protected function applyPropertyModifierToRow(PropertyModifierHook $modifier, $key, $row)
|
||||
{
|
||||
if (! is_object($row)) {
|
||||
throw new InvalidArgumentException('Every imported row MUST be an object');
|
||||
}
|
||||
if ($modifier->requiresRow()) {
|
||||
$modifier->setRow($row);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue