public \Joomla\CMS\Extension\PluginInterface
bootPlugin
(mixed $plugin, mixed $type)
/**
* Boots the plugin with the given name and type.
*
* @param string $plugin The plugin name
* @param string $type The type of the plugin
*
* @return PluginInterface
*
* @since 4.0.0
*/
public function bootPlugin($plugin, $type) : PluginInterface
{
// Normalize the module name
$plugin = strtolower(str_replace('plg_', '', $plugin));
// Path to to look for services
$path = JPATH_SITE . '/plugins/' . $type . '/' . $plugin;
return $this->loadExtension(PluginInterface::class, $plugin . ':' . $type, $path);
}