$plugin = JPluginHelper::importPlugin('system', 'myplugin');
$plugin = JPluginHelper::getPlugin('system', 'myplugin'); $plugin->onAfterRoute();This example gets the plugin object from the Joomla plugin system and calls one of its functions, 'onAfterRoute()'. This function is defined by the plugin and performs some specific action when called. Package Library: Joomla\CMS\Plugin\PluginHelper