mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-18 02:22:53 -05:00
LegacyStorage: write config to disk
Temporarily added URL parameter to test writing configs
This commit is contained in:
parent
ced3baa11b
commit
01c5063839
2 changed files with 12 additions and 1 deletions
|
|
@ -42,6 +42,11 @@ class Businessprocess_ProcessController extends Controller
|
|||
$bp->setEditMode();
|
||||
}
|
||||
|
||||
if ($this->params->get('store')) {
|
||||
$storage->storeProcess($bp);
|
||||
$this->redirectNow($this->getRequest()->getUrl()->without('store'));
|
||||
}
|
||||
|
||||
if ($this->params->get('mode') === 'toplevel') {
|
||||
$this->render('toplevel');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,8 +99,14 @@ class LegacyStorage extends Storage
|
|||
|
||||
/**
|
||||
*/
|
||||
public function storeProcess(BusinessProcess $name)
|
||||
public function storeProcess(BusinessProcess $process)
|
||||
{
|
||||
$filename = $this->getFilename($process->getName());
|
||||
$content = $process->toLegacyConfigString();
|
||||
file_put_contents(
|
||||
$filename,
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
public function getFilename($name)
|
||||
|
|
|
|||
Loading…
Reference in a new issue