AfterBackendGroupListConstraintsAssembledFromDemandEvent
New in version 14.0
The PSR-14 event
\TYPO3\
is dispatched when the backend user repository fetches a list of
filtered backend groups (itself called when displaying the list of groups
in the backend module). It makes it possible to modify query constraints
based on currently active filtering.
Note
This is a sensitive area in terms of security. Please ensure that you are not introducing any breach of security when using this event, for example, by revealing restricted information.
Example
<?php
declare(strict_types=1);
namespace MyVendor\MyExtension\Backend\EventListener;
use TYPO3\CMS\Beuser\Event\AfterBackendGroupListConstraintsAssembledFromDemandEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;
final readonly class MyEventListener
{
#[AsEventListener]
public function __invoke(AfterBackendGroupListConstraintsAssembledFromDemandEvent $event): void
{
$event->constraints[] = $event->query->eq('workspace_perms', 1);
}
}
API
- class AfterBackendGroupListConstraintsAssembledFromDemandEvent
-
- Fully qualified name
-
\TYPO3\
CMS\ Beuser\ Event\ After Backend Group List Constraints Assembled From Demand Event
Event that is dispatched after the backend user repository fetches a list of filtered backend users.
Listeners can modify query constraints based on currently active filtering.
- param $demand
-
An instance of
\TYPO3\containing the current search criteriaCMS\ Beuser\ Domain\ Dto\ Backend User Group - param $query
-
The
\TYPO3\instance being used to assemble the queryCMS\ Extbase\ Persistence\ Query Interface - param $constraints
-
An array of query constraints. New constraints can be added to this array.