\Joomla\Event\DispatcherInterface & $subject The object to observe
array$config An optional associative array of configuration settings.
Recognized key values include 'name', 'group', 'params', 'language'
(this list is not meant to be comprehensive).
Registers a legacy event listener, i.e. a method which accepts individual arguments instead of an AbstractEvent
in its arguments. This provides backwards compatibility to Joomla! 3.x-style plugins.
Registers a proper event listener, i.e. a method which accepts an AbstractEvent as its sole argument. This is the
preferred way to implement plugins in Joomla! 4.x and will be the only possible method with Joomla! 5.x onwards.
A Registry object holding the parameters for the plugin
Since
1.5
protected string
$_name
The name of the plugin
Since
1.5
protected string
$_type
The plugin type
Since
1.5
protected bool
$autoloadLanguage
Affects constructor behavior. If true, language files will be loaded automatically.
Since
3.1
protected bool
$allowLegacyListeners
Should I try to detect and register legacy event listeners, i.e. methods which accept unwrapped arguments? While
this maintains a great degree of backwards compatibility to Joomla! 3.x-style plugins it is much slower. You are
advised to implement your plugins using proper Listeners, methods accepting an AbstractEvent as their sole
parameter, for best performance. Also bear in mind that Joomla! 5.x onwards will only allow proper listeners,
removing support for legacy Listeners.