CWIS Developer Documentation
|
Manager to load and invoke plugins. More...
Public Member Functions | |
__construct ($AppFramework, $PluginDirectories) | |
PluginManager class constructor. More... | |
LoadPlugins ($ForcePluginConfigOptLoad=FALSE) | |
Load and initialize plugins. More... | |
GetErrorMessages () | |
Retrieve any error messages generated during plugin loading. More... | |
GetPlugin ($PluginName) | |
Retrieve specified plugin. More... | |
GetPluginForCurrentPage () | |
Retrieve plugin for current page (if any). More... | |
GetPluginAttributes () | |
Retrieve info about currently loaded plugins. More... | |
GetDependents ($PluginName) | |
Returns a list of plugins dependent on the specified plugin. More... | |
GetActivePluginList () | |
Get list of active (i.e. More... | |
PluginEnabled ($PluginName, $NewValue=NULL) | |
Get/set whether specified plugin is enabled. More... | |
UninstallPlugin ($PluginName) | |
Uninstall plugin and (optionally) delete any associated data. More... | |
FindPluginPhpFile ($PageName) | |
FindPluginHtmlFile ($PageName) | |
Static Public Member Functions | |
static | CfgSaveCallback ($BaseName, $Cfg) |
Manager to load and invoke plugins.
Definition at line 13 of file PluginManager.php.
PluginManager::__construct | ( | $AppFramework, | |
$PluginDirectories | |||
) |
PluginManager class constructor.
ApplicationFramework | $AppFramework | ApplicationFramework within which plugins should run. |
array | $PluginDirectories | Array of names of directories containing plugins, in the order they should be searched. |
Definition at line 24 of file PluginManager.php.
References PluginCaller\$Manager, and ApplicationFramework\ORDER_LAST.
|
static |
Method installed in plugins to allow them to save their configuration information.
string | $BaseName | Plugin base name. |
array | $Cfg | Array of configuration values. |
Definition at line 800 of file PluginManager.php.
PluginManager::FindPluginHtmlFile | ( | $PageName | ) |
Method hooked to EVENT_HTML_FILE_LOAD to find the appropriate HTML file when a plugin page is to be loaded. (This method is not meant to be called directly.)
string | $PageName | Current page name. |
Definition at line 701 of file PluginManager.php.
PluginManager::FindPluginPhpFile | ( | $PageName | ) |
Method hooked to EVENT_PHP_FILE_LOAD to find the appropriate PHP file when a plugin page is to be loaded. (This method is not meant to be called directly.)
string | $PageName | Current page name. |
Definition at line 678 of file PluginManager.php.
PluginManager::GetActivePluginList | ( | ) |
Get list of active (i.e.
enabled) plugins.
Definition at line 323 of file PluginManager.php.
References PluginEnabled().
PluginManager::GetDependents | ( | $PluginName | ) |
Returns a list of plugins dependent on the specified plugin.
string | $PluginName | Base name of plugin. |
Definition at line 303 of file PluginManager.php.
References GetPluginAttributes().
PluginManager::GetErrorMessages | ( | ) |
Retrieve any error messages generated during plugin loading.
Definition at line 249 of file PluginManager.php.
PluginManager::GetPlugin | ( | $PluginName | ) |
Retrieve specified plugin.
string | $PluginName | Base name of plugin. |
Definition at line 259 of file PluginManager.php.
Referenced by GetPluginForCurrentPage().
PluginManager::GetPluginAttributes | ( | ) |
Retrieve info about currently loaded plugins.
Definition at line 281 of file PluginManager.php.
Referenced by GetDependents().
PluginManager::GetPluginForCurrentPage | ( | ) |
Retrieve plugin for current page (if any).
This method relies on the current page having been found within the plugin directory (usually via a "P_" prefix on the page name) via a call to the hooked FindPluginPhpFile() or FindPluginHtmlFile() methods..
Definition at line 272 of file PluginManager.php.
References GetPlugin().
PluginManager::LoadPlugins | ( | $ForcePluginConfigOptLoad = FALSE | ) |
Load and initialize plugins.
The $ForcePluginConfigOptLoad value only applies to plugins that use Plugin::SetUpConfigOptions() to set up their configuration options; plugins that set up their config options via Plugin::Register() will always have them set up.
bool | $ForcePluginConfigOptLoad | If TRUE, configuration options are loaded for all plugins, regardless of whether they are currently enabled. (OPTIONAL, defaults to FALSE) |
Definition at line 53 of file PluginManager.php.
References ApplicationFramework\AddObjectDirectory(), and PluginEnabled().
PluginManager::PluginEnabled | ( | $PluginName, | |
$NewValue = NULL |
|||
) |
Get/set whether specified plugin is enabled.
string | $PluginName | Base name of plugin. |
bool | $NewValue | TRUE to enable, FALSE to disable. (OPTIONAL) |
Definition at line 334 of file PluginManager.php.
Referenced by GetActivePluginList(), LoadPlugins(), and UninstallPlugin().
PluginManager::UninstallPlugin | ( | $PluginName | ) |
Uninstall plugin and (optionally) delete any associated data.
string | $PluginName | Base name of plugin. |
Definition at line 353 of file PluginManager.php.
References PluginEnabled().