The plugin loader and global API
package |
Framework |
---|---|
subpackage |
PluginAPI |
get_instance() : \rcube_plugin_api
__construct()
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
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
load_plugin($plugin_name, $force = false) : boolean
boolean
True on success, false if not loaded or failure
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
array
Meta information about a plugin or False if plugin was not found
register_hook(string $hook, mixed $callback)
string
Hook name
mixed
String with global function name or array($obj, 'methodname')
unregister_hook(string $hook, mixed $callback)
string
Hook name
mixed
String with global function name or array($obj, 'methodname')
exec_hook(string $hook, array $args = array()) : array
This is called from the application and executes all registered handlers
string
Hook name
array
Named arguments (key->value pairs)
array
The (probably) altered hook arguments
register_action(string $action, string $owner, mixed $callback, string $task = null)
string
Action name (_task=mail&_action=plugin.foo)
string
Plugin name that registers this action
mixed
Callback: string with global function name or array($obj, 'methodname')
string
Task name registered by this plugin
exec_action(string $action)
string
Action name
register_handler(string $name, string $owner, mixed $callback)
string
Object name
string
Plugin name that registers this action
mixed
Callback: string with global function name or array($obj, 'methodname')
register_task(string $task, string $owner)
string
Task name (only characters [a-z0-9_-] are allowed)
string
Plugin name that registers this action
is_plugin_task(string $task) : boolean
string
Task name
boolean
True if registered, otherwise false
is_processing(string $hook = null) : boolean
Mainly used to prevent loops and recursion.
string
Hook to check (optional)
boolean
True if any/the given hook is currently processed, otherwise false
include_script(string $fn)
string
Path to script
include_stylesheet(string $fn)
string
Path to stylesheet
add_content(string $html, string $container)
string
HTML content
string
Template container identifier
loaded_plugins() : array
array
List of plugin names
template_container_hook(array $attrib) : array
array
array
resource_url(string $fn) : string
string
Filename
string
instance :
dir :
url :
task :
output :
handlers :
allowed_prefs :
allowed_session_prefs :
plugins :
tasks :
actions :
actionmap :
objectsmap :
template_contents :
active_hook :
deprecated_hooks :