added enabled/disable to styles
This commit is contained in:
@@ -19,11 +19,12 @@ class PluginLoader
|
||||
static::$plugins[$name] = $className;
|
||||
}
|
||||
|
||||
public static function getPlugin(string $name): ApiPluginInterface
|
||||
public static function getPlugin(string $name, $apiProvider = null): ApiPluginInterface
|
||||
{
|
||||
if (!isset(static::$plugins[$name])) {
|
||||
throw new InvalidArgumentException("Plugin {$name} not registered.");
|
||||
}
|
||||
return new static::$plugins[$name]();
|
||||
$className = static::$plugins[$name];
|
||||
return new $className($apiProvider);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user