DirectorObjectForm: Add imports handling вот так

This commit is contained in:
Alexander Fuhr 2015-06-26 15:56:55 +02:00
parent a663d571be
commit bc57937078
1 changed files with 9 additions and 9 deletions

View File

@ -56,15 +56,6 @@ abstract class DirectorObjectForm extends QuickForm
}
}
if ($object->supportsImports()) {
if (array_key_exists('imports', $values)) {
$object->imports()->set(
preg_split('/\s*,\s*/', $values['imports'], -1, PREG_SPLIT_NO_EMPTY)
);
$handled['imports'] = true;
}
}
if ($this->object->supportsCustomVars()) {
$vars = array();
$newvar = array(
@ -94,6 +85,15 @@ abstract class DirectorObjectForm extends QuickForm
}
}
if ($object->supportsImports()) {
if (array_key_exists('imports', $values)) {
$object->imports()->set(
preg_split('/\s*,\s*/', $values['imports'], -1, PREG_SPLIT_NO_EMPTY)
);
$handled['imports'] = true;
}
}
foreach ($handled as $key => $value) {
unset($values[$key]);
}