added enabled/disable to styles

This commit is contained in:
2025-07-30 15:06:05 +02:00
parent 108ca37468
commit 07c6786bda
76 changed files with 438 additions and 8658 deletions

View File

@@ -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);
}
}