isFinished()) { $setup = $wizard->getSetup(); $success = $setup->run(); if ($success) { $wizard->clearSession(); } else { $wizard->setIsFinished(false); } $this->view->success = $success; $this->view->report = $setup->getReport(); } else { $wizard->handleRequest(); $restartForm = new Form(); $restartForm->setUidDisabled(); $restartForm->setName('setup_restart_form'); $restartForm->setAction(Url::fromPath('setup/index/restart')); $restartForm->setAttrib('class', 'restart-form'); $restartForm->addElement( 'button', 'btn_submit', array( 'type' => 'submit', 'value' => 'btn_submit', 'escape' => false, 'label' => $this->view->icon('reply-all'), 'title' => $this->translate('Restart the setup'), 'decorators' => array('ViewHelper') ) ); $this->view->restartForm = $restartForm; } $this->view->wizard = $wizard; $this->view->title = $this->translate('Setup') . ' :: ' . $this->view->defaultTitle; } /** * Reset session and restart the wizard */ public function restartAction() { $this->assertHttpMethod('POST'); $form = new Form(array( 'onSuccess' => function () { $wizard = new WebWizard(); $wizard->clearSession(false); } )); $form->setUidDisabled(); $form->setRedirectUrl('setup'); $form->setSubmitLabel('btn_submit'); $form->handleRequest(); } }