[ Index ]

PHP Cross Reference of DokuWiki




/inc/ -> pluginutils.php (summary)

Utilities for handling plugins

Author: Andreas Gohr
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
File Size: 152 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions


Functions that are not part of a class:

plugin_list($type = '', $all = false)   X-Ref
Return list of available plugins

return: array with plugin names or plugin component names
param: string $type type of plugins; empty string for all
param: bool $all; true to retrieve all, false to retrieve only enabled plugins

plugin_load($type, $name, $new = false, $disabled = false)   X-Ref
Returns plugin object
Returns only new instances of a plugin when $new is true or if plugin is not Singleton,
otherwise an already loaded instance.

return: PluginInterface|null  the plugin object or null on failure
param: $type     string type of plugin to load
param: $name     string name of the plugin to load
param: $new      bool   true to return a new instance of the plugin, false to use an already loaded instance
param: $disabled bool   true to load even disabled plugins

plugin_isdisabled($plugin)   X-Ref
Whether plugin is disabled

return: bool true disabled, false enabled
param: string $plugin name of plugin

plugin_enable($plugin)   X-Ref
Enable the plugin

return: bool true saving succeed, false saving failed
param: string $plugin name of plugin

plugin_disable($plugin)   X-Ref
Disable the plugin

return: bool  true saving succeed, false saving failed
param: string $plugin name of plugin

plugin_directory($plugin)   X-Ref
Returns directory name of plugin

return: string name of directory
param: string $plugin name of plugin

plugin_getcascade()   X-Ref
Returns cascade of the config files

return: array with arrays of plugin configs

plugin_getRequestAdminPlugin()   X-Ref
Return the currently operating admin plugin or null
if not on an admin plugin page

return: Doku_Plugin_Admin