You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The controller EventController uses the hook postEventExecution defined in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fourallportal']['postEventExecution'].
It expects the object to be an instance of interface \Crossmedia\Fourallportal\Hook\EventExecutionHookInterface but never validate if the object indeed implements that interface.
The use of events allows a better type binding and it does not need to be checked if the hook implements the correct interface.
Currently the hooks are only executed if a backend user clicks a button within the backend. Moving the execution of the events from the controller into class EventExecutionService, the events will be triggered even in CLI oder scheduler context.
The controller
EventController
uses the hookpostEventExecution
defined in$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fourallportal']['postEventExecution']
.It expects the object to be an instance of interface
\Crossmedia\Fourallportal\Hook\EventExecutionHookInterface
but never validate if the object indeed implements that interface.crossmedia_fourallportal/Classes/Controller/EventController.php
Line 179 in 3e00a60
Instead of using a hook, the implementation should be migrated to events and the event dispatcher.
https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Events/EventDispatcher/Index.html
The use of events allows a better type binding and it does not need to be checked if the hook implements the correct interface.
Currently the hooks are only executed if a backend user clicks a button within the backend. Moving the execution of the events from the controller into class EventExecutionService, the events will be triggered even in CLI oder scheduler context.
Following two events could be implemented:
\Crossmedia\Fourallportal\Event\AfterProcessMultipleEvents
\Crossmedia\Fourallportal\Event\AfterProcessSingleEvent
The event
\Crossmedia\Fourallportal\Event\AfterProcessMultipleEvents
should be triggered at the end ob methodprocessEvents()
crossmedia_fourallportal/Classes/Service/EventExecutionService.php
Line 345 in 3e00a60
The event
\Crossmedia\Fourallportal\Event\AfterProcessSingleEvent
should be triggered at the end ob methodprocessEvent()
crossmedia_fourallportal/Classes/Service/EventExecutionService.php
Line 627 in 3e00a60
The text was updated successfully, but these errors were encountered: