|
@@ 122-134 (lines=13) @@
|
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
if ( ! $hasPathOrLocales) { |
| 122 |
|
if ($hasLocalizedPrefix) { |
| 123 |
|
foreach ($globals['locales'] as $locale => $localePath) { |
| 124 |
|
$routeName = "{$name}.{$locale}"; |
| 125 |
|
$route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
| 126 |
|
$this->configureRoute($route, $class, $method, $annotation); |
| 127 |
|
$route->setDefault('_locale', $locale); |
| 128 |
|
$collection->add($routeName, $route); |
| 129 |
|
} |
| 130 |
|
} else { |
| 131 |
|
$route = $this->createRoute($globals['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
| 132 |
|
$this->configureRoute($route, $class, $method, $annotation); |
| 133 |
|
$collection->add($name, $route); |
| 134 |
|
} |
| 135 |
|
} elseif ( ! $hasPrefix) { |
| 136 |
|
if ($isLocalized) { |
| 137 |
|
foreach ($locales as $locale => $localePath) { |
|
@@ 136-148 (lines=13) @@
|
| 133 |
|
$collection->add($name, $route); |
| 134 |
|
} |
| 135 |
|
} elseif ( ! $hasPrefix) { |
| 136 |
|
if ($isLocalized) { |
| 137 |
|
foreach ($locales as $locale => $localePath) { |
| 138 |
|
$routeName = "{$name}.{$locale}"; |
| 139 |
|
$route = $this->createRoute($localePath, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
| 140 |
|
$this->configureRoute($route, $class, $method, $annotation); |
| 141 |
|
$route->setDefault('_locale', $locale); |
| 142 |
|
$collection->add($routeName, $route); |
| 143 |
|
} |
| 144 |
|
} else { |
| 145 |
|
$route = $this->createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); |
| 146 |
|
$this->configureRoute($route, $class, $method, $annotation); |
| 147 |
|
$collection->add($name, $route); |
| 148 |
|
} |
| 149 |
|
} else { |
| 150 |
|
if ($hasLocalizedPrefix) { |
| 151 |
|
if ($isLocalized) { |