ImportSourceForm: introduce getSentOrObjectSetting

This commit is contained in:
Thomas Gelf 2015-12-03 01:37:36 +01:00
parent 0b052bb05a
commit 73a718728d
1 changed files with 16 additions and 0 deletions

View File

@ -25,6 +25,22 @@ class ImportSourceForm extends DirectorObjectForm
$this->setButtons();
}
public function getSentOrObjectSetting($name, $default = null)
{
if ($this->hasObject()) {
$value = $this->getSentValue($name);
if ($value === null) {
$object = $this->getObject();
return $object->getSetting($name, $default);
} else {
return $value;
}
} else {
return $this->getSentValue($name, $default);
}
}
protected function addSettings($class = null)
{
if (! ($class = $this->getProviderClass())) {