Elcodi\Plugin\StoreSetupWizardBundle\Services\WizardRoutes::getDefaultWizardRoute PHP Method

getDefaultWizardRoute() public method

Gets the default route.
public getDefaultWizardRoute ( ) : boolean
return boolean If is the default route.
    public function getDefaultWizardRoute()
    {
        return self::DEFAULT_WIZARD_ROUTE;
    }

Usage Example

 /**
  * 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())));
         }
     }
 }