isWizardFinished() 공개 메소드

Checks if the wizard has already been finished
public isWizardFinished ( ) : boolean
리턴 boolean
예제 #1
0
 /**
  * Checks if the plugin should be disabled
  *
  * @param GetResponseEvent $event The response event
  */
 public function handle(GetResponseEvent $event)
 {
     if ($this->plugin->isEnabled() && $this->wizardStatus->isWizardFinished()) {
         $this->plugin->setEnabled(false);
         $this->pluginObjectManager->flush($this->plugin);
     }
 }
 /**
  * Handles the event redirecting to the wizard if the user is visiting the
  * dashboard
  *
  * @param GetResponseEvent $event The response event
  */
 public function handle(GetResponseEvent $event)
 {
     if ($this->plugin->isEnabled() && !$this->wizardStatus->isWizardFinished()) {
         $request = $event->getRequest();
         $currentRoute = $this->getCurrentRequestRoute($request);
         if ('admin_homepage' == $currentRoute) {
             $event->setResponse(new RedirectResponse($this->urlGenerator->generate($this->wizardRoutes->getDefaultWizardRoute())));
         }
     }
 }
예제 #3
0
 /**
  * Render the disable under construction mode.
  *
  * @param EventInterface $event The event
  */
 public function renderDisableUnderConstructionMode(EventInterface $event)
 {
     if ($this->plugin->isUsable()) {
         $masterRequest = $this->requestStack->getMasterRequest();
         $currentRoute = $masterRequest->attributes->get('_route');
         $isWizardFinished = $this->wizardStatus->isWizardFinished();
         if ('admin_configuration_list' == $currentRoute && $isWizardFinished) {
             $this->appendTemplate('@ElcodiStoreSetupWizard/Wizard/disable-under-construction.html.twig', $event, $this->plugin);
         }
     }
 }