this.$emitter.publish
in the directory platform/src/Storefront/Resources/app/storefront/src
to find all occurrences of events being published. This way, you may or may not find an event useful for your needs, so you don't have to override other JavaScript plugins.this.$emitter.publish
, this event is fired on the plugin's own $emitter
instance. This means: Every plugin has its own instance of the emitter. Therefore, you cannot just use this.$emitter.subscribe
to listen to other plugin's events.PluginManager
and then you have to use subscribe
on their $emitter
instance: plugin.$emitter.subscribe
CookiePermission
plugin by its selector via the PluginManager
and using that instance to register to the event. Once the event is then fired, our own method onHideCookieBar
is executed and the alert
will be shown.