.. _feature-1758794400: =============================================================================================== Feature: Introduce `PluginControllerActionContextInterface` and `PluginControllerActionContext` =============================================================================================== Description =========== Interface `\FGTCLB\AcademicBase\Domain\Model\Dto\PluginControllerActionContextInterface` is introduced to describe a shared DTO container for generic data structures required in extbase controller action based events. The interface **should** be used for native type declaration in the event, and either a custom implementation based on the event or default implementation `\FGTCLB\AcademicBase\Domain\Model\Dto\PluginControllerActionContext` can be used to create container when dispatching the events. In most cases provided default implementation should be enough, and additional data provided directly as event property and getter/setter. Example Usage ============= Custom event ------------ .. code-block:: php :caption: EXT:my_ext/Classes/Event/MyCustomControllerActionEvent.php pluginControllerActionContext; } } Dispatch custom event in a controller providing the context information ----------------------------------------------------------------------- .. code-block:: php :caption: EXT:my_ext/Classes/Controller/MyController.php eventDispatcher->dispatch(new MyCustomControllerActionEvent( pluginControllerActionContext: new PluginControllerActionContext( request: $this->request, settings: $this->settings, ), )); } } .. index:: Frontend, EXT:extbase