? Pending

User tests: Successful: Unsuccessful:

avatar mbabker
mbabker
5 Feb 2017

Summary of Changes

The event system in 4.0 makes use of the Framework's Event package. One of the features it supports is the concept of an event subscriber, which is essentially what JPlugin subclasses are but with a different notion of how events are registered. This PR adds support for a plugin "properly" implementing Joomla\Event\SubscriberInterface to explicitly define its event listeners. Plugins implementing this interface will not go through the legacy behavior of finding all public on* methods to register as a listener since the purpose of this interface is to define a method that lists all of the subscribed events and the corresponding listeners.

Testing Instructions

Create a plugin implementing Joomla\Event\SubscriberInterface and verify that the plugin's configured events are correctly registered to the dispatcher. With this interface implemented, only the listeners defined in the interface's getSubscribedEvents method should be registered.

Documentation Changes Required

Note the additional implementation method for defining listeners for plugin events.

avatar mbabker mbabker - open - 5 Feb 2017
avatar mbabker mbabker - change - 5 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2017
Category Libraries
avatar wilsonge wilsonge - change - 5 Feb 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-05 16:55:20
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 5 Feb 2017
avatar wilsonge wilsonge - merge - 5 Feb 2017

Add a Comment

Login with GitHub to post a comment