PluginManager

Checking if a specific plugin is loaded.

If your plugin depends on another plugin, you should put this in your Manifest.

This function will check if the requested plugin has been loaded by Saturn. It will return a true/false boolean result.

use Saturn\PluginManager\PluginLoader;

$PluginLoader = new PluginLoader();

if ($PluginLoader->PluginLoaded('ControlPanel')) {
    // The plugin is installed! It's safe to do stuff with it now.
} else {
    // The plugin is not installed :(
}

Get a plugin's manifest file.

use Saturn\PluginManager\PluginManifest;

$PluginManifest = new PluginManifest();

// The manifest will be returned to this variable as a JSON object.
$Manifest = $PluginManifest->GetManifest('ControlPanel');

Last updated