Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TerminateEvent.php

class TerminateEvent

Allows to execute logic after a response was sent.

Since it's only triggered on main requests, the `getRequestType()` method will always return the value of `HttpKernelInterface::MAIN_REQUEST`.

@author Jordi Boggiano <j.boggiano@seld.be>

Hierarchy

  • class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface
    • class \Symfony\Component\HttpKernel\Event\KernelEvent extends \Symfony\Contracts\EventDispatcher\Event
      • class \Symfony\Component\HttpKernel\Event\TerminateEvent extends \Symfony\Component\HttpKernel\Event\KernelEvent

Expanded class hierarchy of TerminateEvent

7 files declare their use of TerminateEvent
AutomatedCron.php in core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
HttpKernel.php in vendor/symfony/http-kernel/HttpKernel.php
KernelEvents.php in vendor/symfony/http-kernel/KernelEvents.php
PathAliasSubscriber.php in core/modules/path_alias/src/EventSubscriber/PathAliasSubscriber.php
ProfilerListener.php in vendor/symfony/http-kernel/EventListener/ProfilerListener.php

... See full list

File

vendor/symfony/http-kernel/Event/TerminateEvent.php, line 26

Namespace

Symfony\Component\HttpKernel\Event
View source
final class TerminateEvent extends KernelEvent {
    public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) {
        parent::__construct($kernel, $request, HttpKernelInterface::MAIN_REQUEST);
    }
    public function getResponse() : Response {
        return $this->response;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Event::$propagationStopped private property
Event::isPropagationStopped public function Is propagation stopped? Overrides StoppableEventInterface::isPropagationStopped
Event::stopPropagation public function Stops the propagation of the event to further event listeners. 1
KernelEvent::getKernel public function Returns the kernel in which this event was thrown.
KernelEvent::getRequest public function Returns the request the kernel is currently processing.
KernelEvent::getRequestType public function Returns the request type the kernel is currently processing.
KernelEvent::isMainRequest public function Checks if this is the main request.
TerminateEvent::getResponse public function
TerminateEvent::__construct public function Overrides KernelEvent::__construct

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal