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

isWizardHidden() public method

Checks if the wizard is hidden on the given route.
public isWizardHidden ( string $route ) : boolean
$route string The route to check.
return boolean If the wizard is hidden.
    public function isWizardHidden($route)
    {
        $hiddenPages = array_merge($this->wizardRoutesByStep, ['admin_address_new', 'admin_carrier_new']);
        return in_array($route, $hiddenPages);
    }

Usage Example

Example #1
0
 /**
  * Checks if the wizard is visible for this request.
  *
  * @return boolean If visible
  */
 protected function isVisible()
 {
     $masterRequest = $this->requestStack->getMasterRequest();
     if ($masterRequest->query->get('modal', false)) {
         return false;
     }
     $route = $masterRequest->attributes->get('_route');
     return !$this->wizardRoutes->isWizardHidden($route);
 }