The plugin loader and global API
| package |
Framework |
|---|---|
| subpackage |
PluginAPI |
__construct()
add_content(string $html, string $container)
stringHTML content
stringTemplate container identifier
exec_action(string $action)
stringAction name
exec_hook(string $hook, array $args = array()) : array
This is called from the application and executes all registered handlers
stringHook name
arrayNamed arguments (key->value pairs)
arrayThe (probably) altered hook arguments
filter( $plugin) : boolean
boolean
get_info( $plugin_name) : array
This is either provided my a plugin's info() method or extracted from a package.xml or a composer.json file
arrayMeta information about a plugin or False if plugin was not found
get_instance() : \rcube_plugin_api
get_plugin( $name) : \rcube_plugin
include_script(string $fn)
stringPath to script
include_stylesheet(string $fn)
stringPath to stylesheet
init( $app, $task = '')
This has to be done after rcmail::load_gui() or rcmail::json_init() was called because plugins need to have access to rcmail->output
is_plugin_task(string $task) : boolean
stringTask name
booleanTrue if registered, otherwise false
is_processing(string $hook = null) : boolean
Mainly used to prevent loops and recursion.
stringHook to check (optional)
booleanTrue if any/the given hook is currently processed, otherwise false
load_plugin( $plugin_name, $force = false, $require = true) : boolean
booleanTrue on success, false if not loaded or failure
load_plugins( $plugins_enabled, $required_plugins = array())
This has to be done after rcmail::load_gui() or rcmail::json_init() was called because plugins need to have access to rcmail->output
loaded_plugins() : array
arrayList of plugin names
register_action(string $action, string $owner, mixed $callback, string $task = null)
stringAction name (_task=mail&_action=plugin.foo)
stringPlugin name that registers this action
mixedCallback: string with global function name or array($obj, 'methodname')
stringTask name registered by this plugin
register_handler(string $name, string $owner, mixed $callback)
stringObject name
stringPlugin name that registers this action
mixedCallback: string with global function name or array($obj, 'methodname')
register_hook(string $hook, mixed $callback)
stringHook name
mixedString with global function name or array($obj, 'methodname')
register_task(string $task, string $owner)
stringTask name (only characters [a-z0-9_-] are allowed)
stringPlugin name that registers this action
resource_url(string $fn) : string
stringFilename
string
template_container_hook(array $attrib) : array
array
array
unregister_hook(string $hook, mixed $callback)
stringHook name
mixedString with global function name or array($obj, 'methodname')
instance :
dir :
url :
task :
initialized :
output :
handlers :
allowed_prefs :
allowed_session_prefs :
active_plugins :
plugins :
plugins_initialized :
tasks :
actions :
actionmap :
objectsmap :
template_contents :
exec_stack :
deprecated_hooks :