Skip to content
Snippets Groups Projects
Commit fd18c169 authored by Larry Garfield's avatar Larry Garfield
Browse files

Execute termination listeners, including the subscriber formerly known as...

Execute termination listeners, including the subscriber formerly known as drupal_page_footer() and now represented by this class.
parent a88fc53b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -4,14 +4,14 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* @file
*
* Definition of Drupal\Core\EventSubscriber\ResponseSubscriber;
* Definition of Drupal\Core\EventSubscriber\RequestCloseSubscriber;
*/
/**
......@@ -27,10 +27,10 @@ class RequestCloseSubscriber implements EventSubscriberInterface {
* content to drupal_page_set_cache(). There's probably a lot in here that
* needs to get removed/changed.
*
* @param FilterResponseEvent $event
* @param PostResponseEvent $event
* The Event to process.
*/
public function onTerminate(FilterResponseEvent $event) {
public function onTerminate(PostResponseEvent $event) {
global $user;
module_invoke_all('exit');
......
......@@ -32,11 +32,12 @@
// injection container at some point.
request($request);
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$dispatcher = new EventDispatcher();
$resolver = new ControllerResolver();
$kernel = new DrupalKernel($dispatcher, $resolver);
$kernel->handle($request)->send();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment