public getLoadedPlugin ( string $name ) : |
||
$name | string | The name of the plugin, eg, `'Actions'`. |
리턴 |
public function getLoadedPlugin($name)
{
if (!isset($this->loadedPlugins[$name]) || is_null($this->loadedPlugins[$name])) {
throw new \Exception("The plugin '{$name}' has not been loaded.");
}
return $this->loadedPlugins[$name];
}
private function getLoadedAndActivated($pluginName) { if (!$this->pluginManager->isPluginLoaded($pluginName)) { return; } try { if (!$this->pluginManager->isPluginActivated($pluginName)) { return; } $plugin = $this->pluginManager->getLoadedPlugin($pluginName); } catch (\Exception $e) { // we are not allowed to use possible settings from this plugin, plugin is not active return; } return $plugin; }