/** * Registers the event dispatcher and configuration, calls the configure * method and connects the hooks of this listener to the event dispatcher. * * @param PluginAbstract $plugin Plugin object to register this listener on. */ public function __construct($plugin) { $this->plugin = $plugin; parent::__construct($plugin->getEventDispatcher(), $plugin->getConfiguration(), $plugin->getTranslator()); $this->configure(); $this->connectHooksToDispatcher(); }
/** * {@inheritdoc} * * @since 4.8.1 */ public function event($name, $data = array()) { if (!isset($data['caller'])) { $data['caller'] = $this; } return parent::event($name, $data); }