@@ 107-119 (lines=13) @@ | ||
104 | } |
|
105 | ||
106 | if ( ! $hasPathOrLocales) { |
|
107 | if ($hasLocalizedPrefix) { |
|
108 | foreach ($globals['locales'] as $locale => $localePath) { |
|
109 | $routeName = "{$name}.{$locale}"; |
|
110 | $route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
111 | $this->configureRoute($route, $class, $method, $annotation); |
|
112 | $route->setDefault('_locale', $locale); |
|
113 | $collection->add($routeName, $route); |
|
114 | } |
|
115 | } else { |
|
116 | $route = $this->createRoute($globals['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
117 | $this->configureRoute($route, $class, $method, $annotation); |
|
118 | $collection->add($name, $route); |
|
119 | } |
|
120 | } elseif ( ! $hasPrefix) { |
|
121 | if ($isLocalized) { |
|
122 | foreach ($locales as $locale => $localePath) { |
|
@@ 121-133 (lines=13) @@ | ||
118 | $collection->add($name, $route); |
|
119 | } |
|
120 | } elseif ( ! $hasPrefix) { |
|
121 | if ($isLocalized) { |
|
122 | foreach ($locales as $locale => $localePath) { |
|
123 | $routeName = "{$name}.{$locale}"; |
|
124 | $route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
125 | $this->configureRoute($route, $class, $method, $annotation); |
|
126 | $route->setDefault('_locale', $locale); |
|
127 | $collection->add($routeName, $route); |
|
128 | } |
|
129 | } else { |
|
130 | $route = $this->createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
|
131 | $this->configureRoute($route, $class, $method, $annotation); |
|
132 | $collection->add($name, $route); |
|
133 | } |
|
134 | } else { |
|
135 | if ($hasLocalizedPrefix) { |
|
136 | if ($isLocalized) { |