|
@@ 180-186 (lines=7) @@
|
| 177 |
|
|
| 178 |
|
return $value; |
| 179 |
|
}); |
| 180 |
|
$resolver->setNormalizer('name_pattern', function (Options $options, $value) { |
| 181 |
|
if (strstr($value, '{admin}') === false) { |
| 182 |
|
throw new InvalidOptionsException('Admin routing configuration pattern name should contains {admin} placeholder'); |
| 183 |
|
} |
| 184 |
|
|
| 185 |
|
return $value; |
| 186 |
|
}); |
| 187 |
|
$routingConfiguration = $resolver->resolve($routingConfiguration); |
| 188 |
|
// routing configuration |
| 189 |
|
$this->routingUrlPattern = $routingConfiguration['url_pattern']; |
|
@@ 198-204 (lines=7) @@
|
| 195 |
|
->clear() |
| 196 |
|
->setDefault('enabled', true) |
| 197 |
|
->setDefault('pattern', 'lag.admin.{key}'); |
| 198 |
|
$resolver->setNormalizer('pattern', function (Options $options, $value) { |
| 199 |
|
if (strstr($value, 'key') === false) { |
| 200 |
|
throw new InvalidOptionsException('Admin translation configuration pattern should contains {key} placeholder'); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
return $value; |
| 204 |
|
}); |
| 205 |
|
$translationConfiguration = $resolver->resolve($translationConfiguration); |
| 206 |
|
// translation configuration |
| 207 |
|
$this->useTranslation = $translationConfiguration['enabled']; |