Closed joomdonation closed 1 year ago
I would suggest to do not convert to SubscriberInterface here, untill it have a proper event object. But it will be not that easy.
@Fedik As the $event object is an instance of Joomla\Event\Event
, I think the code is fine as it is. Later, if we have a proper event object (which should be a child class of Joomla\Event\Event
), the current code will still work well.
The issue, that then it should not use return, but use "set result". Events does not really support return value. As I remember, currently in Core we do not have a solid solution for it.
The listener could be like:
public function onGetStats(GetStatsEvent $event)
{
...
$extension = $event['extension'];
...
$event['subject']->addStats($stats);
}
We can use the same solution with ResultAware
or $app->triggerEvent. I will have to test it but I think the last commit should address that concern.
yeah, maybe can be like that
Pull Request for Issue # .
Summary of Changes
Covert System - Weblinks plugin to modern plugin structure.
Testing Instructions
Expected result
Works
Actual result
Works
Documentation Changes Required