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

Breadcrumb

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

class Event

Same name in this branch
  1. 11.1.x vendor/open-telemetry/sdk/Trace/Event.php \OpenTelemetry\SDK\Trace\Event
  2. 11.1.x vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Event.php \Opentelemetry\Proto\Trace\V1\Span\Event
  3. 11.1.x vendor/composer/composer/src/Composer/Script/Event.php \Composer\Script\Event
  4. 11.1.x vendor/composer/composer/src/Composer/EventDispatcher/Event.php \Composer\EventDispatcher\Event
  5. 11.1.x core/lib/Drupal/Component/EventDispatcher/Event.php \Drupal\Component\EventDispatcher\Event

Event is the base class for classes containing event data.

This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised.

You can call the method stopPropagation() to abort the execution of further listeners in your event listener.

@author Guilherme Blanco <guilhermeblanco@hotmail.com> @author Jonathan Wage <jonwage@gmail.com> @author Roman Borschel <roman@code-factory.org> @author Bernhard Schussek <bschussek@gmail.com> @author Nicolas Grekas <p@tchwork.com>

Hierarchy

  • class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface

Expanded class hierarchy of Event

12 files declare their use of Event
ConsoleEvent.php in vendor/symfony/console/Event/ConsoleEvent.php
Event.php in core/lib/Drupal/Component/EventDispatcher/Event.php
FailedMessageEvent.php in vendor/symfony/mailer/Event/FailedMessageEvent.php
FileValidationEvent.php in core/modules/file/src/Validation/FileValidationEvent.php
GenericEvent.php in vendor/symfony/event-dispatcher/GenericEvent.php

... See full list

3 string references to 'Event'
DatabaseBackend::schemaDefinition in core/lib/Drupal/Core/Flood/DatabaseBackend.php
Defines the schema for the flood table.
EventDriver::isSupported in vendor/revolt/event-loop/src/EventLoop/Driver/EventDriver.php
PerformanceTestRecorder::onRouteBuilderFinish in core/lib/Drupal/Core/Test/PerformanceTestRecorder.php
Records a router rebuild.

File

vendor/symfony/event-dispatcher-contracts/Event.php, line 31

Namespace

Symfony\Contracts\EventDispatcher
View source
class Event implements StoppableEventInterface {
    private bool $propagationStopped = false;
    public function isPropagationStopped() : bool {
        return $this->propagationStopped;
    }
    
    /**
     * Stops the propagation of the event to further event listeners.
     *
     * If multiple event listeners are connected to the same event, no
     * further event listener will be triggered once any trigger calls
     * stopPropagation().
     */
    public function stopPropagation() : void {
        $this->propagationStopped = true;
    }

}

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

API Navigation

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