---
title: "Developer manual"
manual: "clubdirectory"
version: "main"
permalink: "https://docs.typo3.org/permalink/jweiland/clubdirectory:developer@main"
source: "Developer/Index.rst"
rendered: "2026-11-03T10:50:24+00:00"
---

# Developer manual {#developer}

This chapter describes the PSR-14 events of `clubdirectory` and the event
listeners shipped with the extension.

## Events {#developer-events}

All controller events implement
`\JWeiland\Clubdirectory\Event\ControllerActionEventInterface` with the
methods `getRequest()`, `getControllerName()`, `getActionName()` and
`getSettings()`. The controller name is the short name like `Club`,
`Management`, `Map` or `Search`.

### PreProcessControllerActionEvent {#developer-events-pre-process}

`\JWeiland\Clubdirectory\Event\PreProcessControllerActionEvent` is
dispatched before the property mapping of an action starts, mostly within
the `initialize*Action()` methods. Listeners can replace the request and the
controller arguments, e.g. to modify the property mapping or the file
upload configuration.

Additional methods:

-   **`getArguments()` / `setArguments(Arguments $arguments)`**

    The controller arguments
    (`\TYPO3\CMS\Extbase\Mvc\Controller\Arguments`).

-   **`setRequest(Request $request)`**

    Replaces the Extbase request.

<!-- TODO: no Markdown rendering for "versionchanged" -->

The event replaces the removed InitializeControllerActionEvent and
has the same methods now. The methods getController(),
getClubController(), getMapController() and getClub() have been
removed. Read the club from the request instead.

### PostProcessFluidVariablesEvent {#developer-events-post-process-fluid-variables}

`\JWeiland\Clubdirectory\Event\PostProcessFluidVariablesEvent` is
dispatched before the variables are assigned to the view. Use
`getFluidVariables()` to read and `addFluidVariable(string $key, $value)`
to add or override a variable.

**EXT:my_site_package/Classes/EventListener/AddClubListVariableEventListener.php**

```php
<?php

declare(strict_types=1);

/*
 * This file is part of the package jweiland/clubdirectory.
 *
 * For the full copyright and license information, please read the
 * LICENSE file that was distributed with this source code.
 */

namespace MyVendor\MySitePackage\EventListener;

use JWeiland\Clubdirectory\Event\PostProcessFluidVariablesEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;

#[AsEventListener(identifier: 'my-site-package/add-club-list-variable')]
final readonly class AddClubListVariableEventListener
{
    public function __invoke(PostProcessFluidVariablesEvent $event): void
    {
        if ($event->getControllerName() !== 'Club'
            || $event->getActionName() !== 'list'
        ) {
            return;
        }

        $event->addFluidVariable('myVariable', 'myValue');
    }
}

```

### Removed events {#developer-events-removed}

<!-- TODO: no Markdown rendering for "versionchanged" -->

InitializeControllerActionEvent has been removed. Use
PreProcessControllerActionEvent.PostCheckFileReferenceEvent has been removed without replacement.
Logo and images use the file upload handling of Extbase. Modify the
file upload configuration with PreProcessControllerActionEvent
instead.

## Event listeners of clubdirectory {#developer-event-listeners}

Use these identifiers, if you want to register your own listener `before`
or `after` one of them.

| Identifier | Event | Controller actions and purpose |
| --- | --- | --- |
| `clubdirectory/restrictAccess` | `PreProcessControllerActionEvent` | `Management`: create, edit, update, activate. `Map`: new, create. Allows the access to the club for owners, backend administrators and valid moderation tokens only. Stops with the 403 error handling of the site otherwise. `activate` gets the club UID as scalar argument `clubUid`. See [Access control and error pages](https://docs.typo3.org/permalink/jweiland/clubdirectory:moderation-access@main). |
| `clubdirectory/register-hidden-club` | `PreProcessControllerActionEvent` | `Management`: edit, update, confirmActivation. `Map`: new, create. Registers the hidden club for the property mapper. Executed after `clubdirectory/restrictAccess`. |
| `clubdirectory/apply-upload-folder` | `PreProcessControllerActionEvent` | `Management`: create, update. Sets the upload folder of logo and images from `settings.new.uploadFolder`. |
| `clubdirectory/check-fal-uploads` | `PreProcessControllerActionEvent` | `Management`: create, update. Adds the validator of checkfaluploads to logo and images, if checkfaluploads is installed. See [Rights checkbox of checkfaluploads](https://docs.typo3.org/permalink/jweiland/clubdirectory:upgrade-9-0-0-checkfaluploads@main). |
| `clubdirectory/allow-search-parameter` | `PreProcessControllerActionEvent` | `Search`: listSearchResults. Allows the search arguments also for GET requests, e.g. of the page browser. |
| `JWeilandClubdirectoryEventListenerAddPaginatorEventListener` | `PostProcessFluidVariablesEvent` | `Club`: list. `Search`: listSearchResults. Adds the paginator and the pagination. |
| `JWeilandClubdirectoryEventListenerAddGlossaryEventListener` | `PostProcessFluidVariablesEvent` | `Club`: list. Adds the glossary of glossary2. |
| `JWeilandClubdirectoryEventListenerSetTitleOfPOIToClubTitleEventListener` | `JWeilandMaps2EventPostProcessPoiCollectionRecordEvent` | Sets the club title as title of the POI records of clubs saved in the backend. |

<!-- TODO: no Markdown rendering for "versionchanged" -->

The event listeners AssignMediaTypeConverterEventListener and
DeleteUploadedFilesEventListener have been removed. The listeners
clubdirectory/restrictAccess and clubdirectory/allow-search-parameter
listen to PreProcessControllerActionEvent now.
