Developer manual
This chapter describes the PSR-14 events of clubdirectory and the event
listeners shipped with the extension.
Events
All controller events implement
\JWeiland\ with the
methods get, get, get and
get. The controller name is the short name like Club,
Management, Map or Search.
PreProcessControllerActionEvent
\JWeiland\ 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:
get/Arguments () setArguments (Arguments $arguments) - The controller arguments
(
\TYPO3\).CMS\ Extbase\ Mvc\ Controller\ Arguments setRequest (Request $request) - Replaces the Extbase request.
Changed in version 9.0.0
The event replaces the removed Initialize and
has the same methods now. The methods get,
get, get and get have been
removed. Read the club from the request instead.
PostProcessFluidVariablesEvent
\JWeiland\ is
dispatched before the variables are assigned to the view. Use
get to read and add
to add or override a variable.
<?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
Changed in version 9.0.0
Initializehas been removed. UseController Action Event Pre.Process Controller Action Event Posthas been removed without replacement. Logo and images use the file upload handling of Extbase. Modify the file upload configuration withCheck File Reference Event Preinstead.Process Controller Action Event
Event listeners of clubdirectory
Use these identifiers, if you want to register your own listener before
or after one of them.
| Identifier | Event | Controller actions and purpose |
|---|---|---|
clubdirectory/ | Pre | 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 club. See
Access control and error pages. |
clubdirectory/ | Pre | Management: edit, update, confirmActivation. Map: new,
create. Registers the hidden club for the property mapper.
Executed after clubdirectory/. |
clubdirectory/ | Pre | Management: create, update. Sets the upload folder of
logo and images from settings.. |
clubdirectory/ | Pre | Management: create, update. Adds the validator of
checkfaluploads to logo and images, if checkfaluploads is
installed. See Rights checkbox of checkfaluploads. |
clubdirectory/ | Pre | Search: listSearchResults. Allows the search arguments
also for GET requests, e.g. of the page browser. |
JWeiland | Post | Club: list. Search: listSearchResults. Adds the
paginator and the pagination. |
JWeiland | Post | Club: list. Adds the glossary of glossary2. |
JWeiland | JWeiland | Sets the club title as title of the POI records of clubs saved in the backend. |
Changed in version 9.0.0
The event listeners Assign and
Delete have been removed. The listeners
clubdirectory/ and clubdirectory/
listen to Pre now.