Use new request stack. Addresses #9.
This commit is contained in:
parent
4d3a4df647
commit
f2e21f3a1a
4 changed files with 4 additions and 5 deletions
|
|
@ -11,7 +11,6 @@ use Drupal\Core\Render\RendererInterface;
|
|||
use Drupal\Core\Routing\CurrentRouteMatch;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
|
|
@ -136,7 +135,7 @@ class AjaxBlocksController extends ControllerBase {
|
|||
}
|
||||
|
||||
$new_request = Request::create($path);
|
||||
$request_stack = new RequestStack();
|
||||
$request_stack = \Drupal::requestStack();
|
||||
$processed = $this->pathProcessor->processInbound($new_request->getPathInfo(), $new_request);
|
||||
|
||||
$this->currentPath->setPath($processed);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class AdvancedSearchForm extends FormBase {
|
|||
*/
|
||||
public static function create(ContainerInterface $container) {
|
||||
return new static(
|
||||
$container->get('request_stack')->getMasterRequest(),
|
||||
$container->get('request_stack')->getMainRequest(),
|
||||
$container->get('current_route_match')
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class AdvancedSearchBlock extends BlockBase implements ContainerFactoryPluginInt
|
|||
$plugin_definition,
|
||||
$container->get('plugin.manager.search_api.display'),
|
||||
$container->get('form_builder'),
|
||||
$container->get('request_stack')->getMasterRequest()
|
||||
$container->get('request_stack')->getMainRequest()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class SearchResultsPagerBlock extends BlockBase implements ContainerFactoryPlugi
|
|||
$configuration,
|
||||
$plugin_id,
|
||||
$plugin_definition,
|
||||
$container->get('request_stack')->getMasterRequest()
|
||||
$container->get('request_stack')->getMainRequest()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue