Plugin interface class
| package |
Framework |
|---|---|
| subpackage |
PluginAPI |
add_hook(string $hook, mixed $callback)
stringHook name
mixedCallback function as string or array with object reference and method name
add_label()
add_texts(string $dir, mixed $add2client = false)
stringDirectory to search in
mixedMake texts also available on the client (array with list or true for all)
gettext(string $p) : string
include_plugin( $plugin_name) : boolean
booleanTrue on success, false on failure
include_script(string $fn)
stringFile path; absolute or relative to the plugin directory
include_stylesheet(string $fn)
stringFile path; absolute or relative to the plugin directory
info() : array
arrayMeta information about a plugin or false if not implemented: As hash array with the following keys: name: The plugin name vendor: Name of the plugin developer version: Plugin version name license: License name (short form according to http://spdx.org/licenses/) uri: The URL to the plugin homepage or source repository src_uri: Direct download URL to the source code of this plugin require: List of plugins required for this one (as array of plugin names)
init()
label_map_callback(string $key) : string
stringArray key.
string
load_config(string $fname = 'config.inc.php') : boolean
The loaded values are patched over the global configuration.
stringConfig file name relative to the plugin's folder
booleanTrue on success, false on failure
local_skin_path() : string
stringSkin path relative to plugins directory
register_action(string $action, mixed $callback)
The callback will be executed upon a request like /?_task=mail&_action=plugin.myaction
stringAction name (should be unique)
mixedCallback 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
stringObject name (should be unique and start with 'plugin.')
mixedCallback function as string or array with object reference and method name
register_task(string $task)
stringTask name (only characters [a-z0-9_-] are allowed)
remove_hook(string $hook, mixed $callback)
stringHook name
mixedCallback function as string or array with object reference and method name
require_plugin( $plugin_name) : boolean
booleanTrue on success, false on failure
resource_url(string $fn)
stringFilename
url(string $fn) : string
stringThe file name
stringAbsolute URL to the given resource
ID : string
| var |
|---|
string
task : string
| var |
|---|
string
noajax : boolean
| var |
|---|
boolean
noframe : boolean
| var |
|---|
boolean
allowed_prefs : array
| var |
|---|
array
home :
urlbase :
mytask :
loaded_config :