Closed
Description
I would like to hook on the event core_collection_abstract_load_before
. But in my observer i would like to inject the \Magento\Backend\Model\Auth
, so i can get the logged in admin. This gives problems because Somewhere in the injecting process of Auth, we try to inject the StoreManager
which itself again tries to load a collection of stores. This breaks the whole process and means i will have to manually define all the events that use load_before
, but than with the event_prefix
.
Defining an except in the <event>
tag would result in less work. We could even make it accept a list?
<event name="core_collection_abstract_load_before" exclude="store_collection_load_before">
<observer name="foo_bar_event_prefixed_collection_load_before" instance="Foo\Bar\Model\Observer" method="coreCollectionLoadBefore" />
</event>
Or is maybe something already possible?