@@ 70-82 (lines=13) @@ | ||
67 | } |
|
68 | ||
69 | if ( ! $hasPathOrLocales) { |
|
70 | if ($hasLocalizedPrefix) { |
|
71 | foreach ($globals['locales'] as $locale => $localePath) { |
|
72 | $routeName = "{$name}.{$locale}"; |
|
73 | $route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
74 | $this->configureRoute($route, $class, $method, $annotation); |
|
75 | $route->setDefault('_locale', $locale); |
|
76 | $collection->add($routeName, $route); |
|
77 | } |
|
78 | } else { |
|
79 | $route = $this->createRoute($globals['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
80 | $this->configureRoute($route, $class, $method, $annotation); |
|
81 | $collection->add($name, $route); |
|
82 | } |
|
83 | } elseif ( ! $hasPrefix) { |
|
84 | if ($isLocalized) { |
|
85 | foreach ($locales as $locale => $localePath) { |
|
@@ 84-96 (lines=13) @@ | ||
81 | $collection->add($name, $route); |
|
82 | } |
|
83 | } elseif ( ! $hasPrefix) { |
|
84 | if ($isLocalized) { |
|
85 | foreach ($locales as $locale => $localePath) { |
|
86 | $routeName = "{$name}.{$locale}"; |
|
87 | $route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
88 | $this->configureRoute($route, $class, $method, $annotation); |
|
89 | $route->setDefault('_locale', $locale); |
|
90 | $collection->add($routeName, $route); |
|
91 | } |
|
92 | } else { |
|
93 | $route = $this->createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
94 | $this->configureRoute($route, $class, $method, $annotation); |
|
95 | $collection->add($name, $route); |
|
96 | } |
|
97 | } else { |
|
98 | if ($hasLocalizedPrefix) { |
|
99 | if ($isLocalized) { |