|
@@ 187-193 (lines=7) @@
|
| 184 |
|
|
| 185 |
|
return $value; |
| 186 |
|
}); |
| 187 |
|
$resolver->setNormalizer('name_pattern', function (Options $options, $value) { |
| 188 |
|
if (strstr($value, '{admin}') === false) { |
| 189 |
|
throw new InvalidOptionsException('Admin routing configuration pattern name should contains {admin} placeholder'); |
| 190 |
|
} |
| 191 |
|
|
| 192 |
|
return $value; |
| 193 |
|
}); |
| 194 |
|
$routingConfiguration = $resolver->resolve($routingConfiguration); |
| 195 |
|
// routing configuration |
| 196 |
|
$this->routingUrlPattern = $routingConfiguration['url_pattern']; |
|
@@ 205-211 (lines=7) @@
|
| 202 |
|
->clear() |
| 203 |
|
->setDefault('enabled', true) |
| 204 |
|
->setDefault('pattern', 'lag.admin.{key}'); |
| 205 |
|
$resolver->setNormalizer('pattern', function (Options $options, $value) { |
| 206 |
|
if (strstr($value, 'key') === false) { |
| 207 |
|
throw new InvalidOptionsException('Admin translation configuration pattern should contains {key} placeholder'); |
| 208 |
|
} |
| 209 |
|
|
| 210 |
|
return $value; |
| 211 |
|
}); |
| 212 |
|
$translationConfiguration = $resolver->resolve($translationConfiguration); |
| 213 |
|
// translation configuration |
| 214 |
|
$this->useTranslation = $translationConfiguration['enabled']; |