entity_name.event
. For products, this could be e.g. product.written
or product.deleted
. For your custom entity, this then would be custom_entity.written
or custom_entity.deleted
.@Event
in your project.written
event.dispatch
is optional and represents the actual event's name. If the second parameter is not applied, the class name will be used as a fallback.<shopware root>/platform/src
or the <shopware root>/vendor/shopware/platform/src
directory, depending on whether you're using the development or the production template. Use one of the following search terms:extends NestedEvent
: This way you will find the events themselves.extends Event
: This way you will find the events themselves.->dispatch
: Here you will find all the occurrences where the events are actually being fired.event_dispatcher
in order to do so.event_dispatcher
:event_dispatcher
in the respective .xml
files.EventDispatcherInterface
, you're most likely going to find at least one event being fired in that service.GenericPageLoadedEvent
every time the page is being loaded.Criteria
class, at least if you've dealt with the Data Abstraction Layer. There are many methods, that will dispatch a "criteria" event whenever a given default Shopware entity is being loaded using a Criteria
instance.Criteria
object, the ProductListingCriteriaEvent
is being fired.Criteria
object and therefore add or remove conditions, add or remove associations etc. Of course, the code above is just one example excerpt and there are many more of those events for different entities.CriteriaEvent
.implements BusinessEventInterface
or implements MailActionInterface
. The latter implement the MailActionInterface
because they're events which will result in a mail being sent, e.g. when a customer placed an order. Customer login however will obviously not result in a mail being sent and therefore is "only" implement the BusinessEventInterface
.someEvent
and gain access to additionalData
here.<shopware root>/platform/src/Storefront/Resources/app/storefront/src
directory for the development template or the <shopware root>/vendor/shopware/platform/src/Storefront/Resources/app/storefront/src
directory for the production template: $emitter.publish
. This way, you'll find all occurrences of plugins actually firing a custom event.$emit
in the <shopware root>/platform/src/Administration/Resources/app/administration/src
directory for the development template or the <shopware root>/vendor/shopware/platform/src/Administration/Resources/app/administration/src
directory for the production template.