Наследование: extends Piwik\View
Пример #1
0
 /**
  * Installation Step 8: Finished!
  */
 public function finished()
 {
     $this->checkPiwikIsNotInstalled();
     $view = new View('@Installation/finished', $this->getInstallationSteps(), __FUNCTION__);
     $form = new FormDefaultSettings();
     /**
      * Triggered on initialization of the form to customize default Piwik settings (at the end of the installation process).
      *
      * @param \Piwik\Plugins\Installation\FormDefaultSettings $form
      */
     Piwik::postEvent('Installation.defaultSettingsForm.init', array($form));
     $form->addElement('submit', 'submit', array('value' => Piwik::translate('General_ContinueToPiwik') . ' »', 'class' => 'btn btn-lg'));
     if ($form->validate()) {
         try {
             /**
              * Triggered on submission of the form to customize default Piwik settings (at the end of the installation process).
              *
              * @param \Piwik\Plugins\Installation\FormDefaultSettings $form
              */
             Piwik::postEvent('Installation.defaultSettingsForm.submit', array($form));
             $this->markInstallationAsCompleted();
             Url::redirectToUrl('index.php');
         } catch (Exception $e) {
             $view->errorMessage = $e->getMessage();
         }
     }
     $view->addForm($form);
     $view->showNextStep = false;
     $output = $view->render();
     return $output;
 }
Пример #2
0
 /**
  * Installation Step 8: Finished!
  */
 public function finished()
 {
     $this->markInstallationAsCompleted();
     $view = new View('@Installation/finished', $this->getInstallationSteps(), __FUNCTION__);
     $view->showNextStep = false;
     $output = $view->render();
     return $output;
 }
Пример #3
0
 /**
  * Installation Step 9: Finished!
  */
 public function finished()
 {
     $this->checkPreviousStepIsValid(__FUNCTION__);
     $view = new View('@Installation/finished', $this->getInstallationSteps(), __FUNCTION__);
     $this->skipThisStep(__FUNCTION__);
     $configPath = Config::getLocalConfigPath();
     if (!file_exists($configPath)) {
         $this->addTrustedHosts();
         $this->writeConfigFileFromSession();
     }
     $view->showNextStep = false;
     $this->session->currentStepDone = __FUNCTION__;
     $output = $view->render();
     $this->session->unsetAll();
     return $output;
 }