Use a dedicated method to clear a wizard's session
Simplifies session removal in case a sub-class of Icinga\Web\Wizard requires special session handling refs #7163
This commit is contained in:
parent
a8dd9c933d
commit
03bbc2e2e6
|
@ -27,7 +27,7 @@ class SetupController extends ActionController
|
|||
$installer = $wizard->getInstaller();
|
||||
$success = $installer->run();
|
||||
if ($success) {
|
||||
$wizard->getSession()->clear();
|
||||
$wizard->clearSession();
|
||||
} else {
|
||||
$wizard->setIsFinished(false);
|
||||
}
|
||||
|
|
|
@ -407,6 +407,14 @@ class Wizard
|
|||
return Session::getSession()->getNamespace(get_class($this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the session being used by this wizard
|
||||
*/
|
||||
public function clearSession()
|
||||
{
|
||||
$this->getSession()->clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add buttons to the given page based on its position in the page-chain
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue