O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Listeners

The event dispatcher must know what listeners are interested in an event. In this section we will discuss how listeners are attached to the event dispatcher.

Registering listeners

When we create a new plugin, if we are using functions we must inform the application of each function and event. We do this using the application's registerEvent() method. The method accepts two parameters, the name of the event and the name of the handler. This acts as a pass-through method for the global event dispatcher register() method.

Technically, the name of the handler can be the name of a class. We rarely need to use the method in that context because when we load a plugin that defines a class, Joomla! automatically registers the class and events for ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required