-
Notifications
You must be signed in to change notification settings - Fork 6
10. Custom Event Listeners
The Symfony framework provides Events Listeners. When a HTTP request is received, Symfony will process the request and return an appropriate HTTP response. During processing of a request, event notifications are triggered. Event listeners subscribed to or listening for these notifications may modify the request or response data, or execute additional actions.
You can write your own custom Event Listeners to modify how the Datahub application processes records when they are ingested or retrieved through the API or the OAI-PMH endpoint. This could be useful if you want to customise the behaviour of the Datahub (i.e. add or modify nodes in the DOM of XML documents, send out notifications to a logging component when a request is processed, customise access grants,...)
(Create a separate bundle for your custom event listener code) (Register your bundle in AppKernel.php) (Symfony 2.8 v. later versions!)