You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
18
{
19
72
$this->request = $request;
20
72
}
21
22
72
public function get(Scope $scope, Config $config): ?Locale
23
{
24
72
if (!isset($config['query_key'])) {
25
1
return null;
26
}
27
28
71
if (!$queryValue = $this->request->get($config['query_key'])) {