/** * 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 __construct($data, PluginInterface $parent, ComponentFactoryInterface $factory = null) { parent::__construct($data, $factory); $this->_setParent($parent); }