Plugin interface class
package |
Framework |
---|---|
subpackage |
PluginAPI |
init()
info() : array
array
Meta information about a plugin or false if not implemented
require_plugin($plugin_name) : boolean
boolean
True on success, false on failure
load_config(string $fname = 'config.inc.php') : boolean
The loaded values are patched over the global configuration.
string
Config file name relative to the plugin's folder
boolean
True on success, false on failure
add_hook(string $hook, mixed $callback)
string
Hook name
mixed
Callback function as string or array
with object reference and method name
remove_hook(string $hook, mixed $callback)
string
Hook name
mixed
Callback function as string or array
with object reference and method name
add_texts(string $dir, mixed $add2client = false)
string
Directory to search in
mixed
Make texts also available on the client
(array with list or true for all)
add_label()
gettext(string $p) : string
register_task(string $task)
string
Task name (only characters [a-z0-9_-] are allowed)
register_action(string $action, mixed $callback)
The callback will be executed upon a request like /?_task=mail&_action=plugin.myaction
string
Action name (should be unique)
mixed
Callback function as string
or array with object reference and method name
register_handler(string $name, mixed $callback)
When parsing a template for display, tags like
string
Object name (should be unique and start with 'plugin.')
mixed
Callback function as string or array with object reference
and method name
include_script(string $fn)
string
File path; absolute or relative to the plugin directory
include_stylesheet(string $fn)
string
File path; absolute or relative to the plugin directory
url(string $fn) : string
string
The file name
string
Absolute URL to the given resource
resource_url(string $fn)
string
Filename
local_skin_path() : string
string
Skin path relative to plugins directory
label_map_callback(string $key) : string
string
Array key.
string
ID : string
var | |
---|---|
string
task : string
var | |
---|---|
string
noajax : boolean
var | |
---|---|
boolean
noframe : boolean
var | |
---|---|
boolean
allowed_prefs : array
var | |
---|---|
array
home :
urlbase :
mytask :