---
title: "Events"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extension-development-events@11.5"
source: "ExtensionArchitecture/HowTo/Events/Index.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Events {#extension-development-events}

[PSR-14 events](https://docs.typo3.org/permalink/t3coreapi:eventdispatcher@11.5) can be used to extend the TYPO3 Core
or third-party extensions.

You can find a complete list of events provided by the TYPO3 Core in the
following chapter: [Event list](https://docs.typo3.org/permalink/t3coreapi:eventlist@11.5).

Events provided by third-party extensions should be described in the extension's
manual. You can also search for events by looking for classes that inject the
[EventDispatcherInterface](https://docs.typo3.org/permalink/t3coreapi:eventdispatcherobject@11.5)

## Listen to an event {#extension-development-event-listener}

If you want to use an event provided by the Core or a third-party extension,
create a PHP class with a method `__invoke(SomeCoolEvent $event)`
that accepts an object of the event class as
argument. It is possible to use another method name but you have to configure
the name in the `Configuration/Services.yaml` or it is not found.

It is best practice to use a descriptive class name and to put it in the
namespace `\MyVendor\MyExtension\EventListener`.

```php
<?php
// EXT:my_extension/Classes/EventListener/Joh316PasswordInvalidator.php
declare(strict_types=1);

namespace MyVendor\MyExtension\EventListener;

use TYPO3\CMS\FrontendLogin\Event\PasswordChangeEvent;

/**
 * The password 'joh316' was historically used as default password for
 * the TYPO3 install tool.
 * Today this password is an unsecure choice as it is well-known, too short
 * and does not contain capital letters or special characters.
 */
final class Joh316PasswordInvalidator
{
    public function __invoke(PasswordChangeEvent $event): void
    {
        if ($event->getRawPassword() === 'joh316') {
            $event->setAsInvalid('This password is not allowed');
        }
    }
}

```

Then register the event in your extension's `Configuration/Services.yaml`:

```yaml
# EXT:my_extension/Configuration/Services.yaml
services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false
  # ...
  MyVendor\MyExtension\EventListener\Joh316PasswordInvalidator:
    tags:
      - name: event.listener
        identifier: 'myJoh316PasswordInvalidator'

```

Additionally, the `Configuration/Services.yaml` file allows to define a different
method name for the event listener class and to influence the order in which
events are loaded. See [Registering the event listener](https://docs.typo3.org/permalink/t3coreapi:eventdispatcherregistration@11.5) for details.

## Dispatch an event {#dispatch-an-event}

You can dispatch events in your own extension's code to enable other extensions
to extend your code. Events are the preferred method of making code in TYPO3
extensions extendable.

See [Event Dispatcher, Quickstart](https://docs.typo3.org/permalink/t3coreapi:eventdispatcherquickstart@11.5) on how
to create a custom event and dispatch it.
