Dispatch a Custom Plugin Event with the Event Dispatcher
Imports a plugin group and dispatches an extensible event object via $app->getDispatcher()->dispatch() in Joomla 5 and 6.
<?php
declare(strict_types=1);
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Event\Event;
// ...