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.
Parameters
- string $methodName The method name to register
Returns
Since
/**
* 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.
*
* @param string $methodName The method name to register
*
* @return void
*
* @since 4.0.0
*/
protected final function registerListener(string $methodName)
{
$this->getDispatcher()->addListener($methodName, [$this, $methodName]);
}