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
So today I'm adding a feature for my app somewhat unrelated to the Sylius inner workings, but part of what I'm doing has me hooking into the various controller events to catch certain activities. Looking at the base ResourceController, I'm noticing some potential inconsistencies. Any particular reason for this? Ideally I'd suggest things be consistent across the board and an event is always dispatched before handling the view, but this might require a B/C breaking change in Sylius\Bundle\ResourceBundle\Controller\EventDispatcherInterface to allow a null resource for the index action or dispatching the event with the result of the Sylius\Bundle\ResourceBundle\Controller\ResourcesCollectionProviderInterface::get() call which isn't a singular resource.
showAction
Dispatches a show event before creating the view
indexAction
No event dispatched
createAction
pre/post events dispatched when POSTing data
No event dispatched for rendering a view (GET request)
updateAction
pre/post events dispatched when submitting data (POST, PUT, PATCH requests)
No event dispatched for rendering a view (GET request)
deleteAction
pre/post events dispatched
The text was updated successfully, but these errors were encountered:
@pjedrzejewski Wouldn't it make sense to fix this before 1.0? I was looking into the 'index' event, but it's not being fired. Would be very helpful to have it I think, especially for plugins.
So today I'm adding a feature for my app somewhat unrelated to the Sylius inner workings, but part of what I'm doing has me hooking into the various controller events to catch certain activities. Looking at the base ResourceController, I'm noticing some potential inconsistencies. Any particular reason for this? Ideally I'd suggest things be consistent across the board and an event is always dispatched before handling the view, but this might require a B/C breaking change in
Sylius\Bundle\ResourceBundle\Controller\EventDispatcherInterface
to allow a null resource for the index action or dispatching the event with the result of theSylius\Bundle\ResourceBundle\Controller\ResourcesCollectionProviderInterface::get()
call which isn't a singular resource.showAction
indexAction
createAction
updateAction
deleteAction
The text was updated successfully, but these errors were encountered: