mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-25 23:04:53 +02:00
DirectorObjectForm: Add imports handling вот так
This commit is contained in:
parent
a663d571be
commit
bc57937078
@ -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()) {
|
if ($this->object->supportsCustomVars()) {
|
||||||
$vars = array();
|
$vars = array();
|
||||||
$newvar = 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) {
|
foreach ($handled as $key => $value) {
|
||||||
unset($values[$key]);
|
unset($values[$key]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user