Before a plugin can respond to an event, the plugin must be loaded. When we normally load plugins we load a group at a time. To do this we use the static
The following example shows how we would load plugins from the group
It is essential that we import plugins before firing events that relate to them. There is one time when this does not apply; we never need to import
system plugins. System plugins are imported irrespective of the request that is being handled. It is, however, unlikely that we would ever need to trigger a system event because Joomla! should handle all system events.
So where and when do we import plugins? For starters it does not matter if we ...