class RequestCloseSubscriber implements EventSubscriberInterface (View source)

Subscriber for all responses.

Properties

protected ModuleHandlerInterface $moduleHandler

Methods

__construct(ModuleHandlerInterface $module_handler)

Constructs a new RequestCloseSubscriber instance.

onTerminate(TerminateEvent $event)

Performs end of request tasks.

static array
getSubscribedEvents()

Registers the methods in this class that should be listeners.

Details

__construct(ModuleHandlerInterface $module_handler)

Constructs a new RequestCloseSubscriber instance.

Parameters

ModuleHandlerInterface $module_handler

The module handler.

onTerminate(TerminateEvent $event)

Performs end of request tasks.

The body of this function has just been copied almost verbatim from drupal_page_footer(). There's probably a lot in here that needs to get removed/changed. Also, if possible, do more light-weight shutdowns on AJAX requests.

Parameters

TerminateEvent $event

The Event to process.

static array getSubscribedEvents()

Registers the methods in this class that should be listeners.

Return Value

array

An array of event listener definitions.