configureRoute example

$defaults[$param->name] = $defaultValue;
                    } elseif ($defaultValue instanceof \BackedEnum) {
                        $defaults[$param->name] = $defaultValue->value;
                    }
                    break;
                }
            }
        }

        foreach ($paths as $locale => $path) {
            $route = $this->createRoute($path$defaults$requirements$options$host$schemes$methods$condition);
            $this->configureRoute($route$class$method$annot);
            if (0 !== $locale) {
                $route->setDefault('_locale', $locale);
                $route->setRequirement('_locale', preg_quote($locale));
                $route->setDefault('_canonical_route', $name);
                $collection->add($name.'.'.$locale$route$priority);
            } else {
                $collection->add($name$route$priority);
            }
        }
    }

    
$defaults[$param->name] = $defaultValue;
                    } elseif ($defaultValue instanceof \BackedEnum) {
                        $defaults[$param->name] = $defaultValue->value;
                    }
                    break;
                }
            }
        }

        foreach ($paths as $locale => $path) {
            $route = $this->createRoute($path$defaults$requirements$options$host$schemes$methods$condition);
            $this->configureRoute($route$class$method$annot);
            if (0 !== $locale) {
                $route->setDefault('_locale', $locale);
                $route->setRequirement('_locale', preg_quote($locale));
                $route->setDefault('_canonical_route', $name);
                $collection->add($name.'.'.$locale$route$priority);
            } else {
                $collection->add($name$route$priority);
            }
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.