Class Plugin
Abstract class that all Plugin handlers extend
Defines all methods plugin handlers must inherit and provides all methods
common between all plugin handlers
Methods summary
abstract public
string
|
#
getName( )
Returns the name of this plugin
Returns the name of this plugin
Returns
string The common name of this plugin
|
abstract public
string
|
#
getVersion( )
Returns the version of this plugin
Returns the version of this plugin
Returns
string The current version of this plugin
|
abstract public
array
|
#
getAuthors( )
Returns the name and URL for the authors of this plugin
Returns the name and URL for the authors of this plugin
Returns
array The name and URL of the authors of this plugin
|
public
|
#
install( integer $plugin_id )
Performs any necessary bootstraping actions
Performs any necessary bootstraping actions
Parameters
- $plugin_id
integer $plugin_id The ID of the plugin being installed
|
public
|
#
upgrade( string $current_version )
Performs migration of data from $current_version (the current installed
version) to the given file set version
Performs migration of data from $current_version (the current installed
version) to the given file set version
Parameters
- $current_version
string $current_version The current installed version of this plugin
|
public
|
#
uninstall( integer $plugin_id, boolean $last_instance )
Performs any necessary cleanup actions
Performs any necessary cleanup actions
Parameters
- $plugin_id
integer $plugin_id The ID of the plugin being uninstalled
- $last_instance
boolean $last_instance True if $plugin_id is the last instance across all companies for
this plugin, false otherwise
|
public
array
|
#
getActions( )
Returns all actions to be configured for this widget (invoked after install()
or upgrade(), overwrites all existing actions)
Returns all actions to be configured for this widget (invoked after install()
or upgrade(), overwrites all existing actions)
Returns
array A numerically indexed array containing: - action The action to register for -
uri The URI to be invoked for the given action - name The name to represent the
action (can be language definition)
|
public
array
|
#
getEvents( )
Returns all events to be registered for this plugin (invoked after install()
or upgrade(), overwrites all existing events)
Returns all events to be registered for this plugin (invoked after install()
or upgrade(), overwrites all existing events)
Returns
array A numerically indexed array containing: - event The event to register for -
callback A string or array representing a callback function or class/method. If
a user (e.g. non-native PHP) function or class/method, the plugin must
automatically define it when the plugin is loaded. To invoke an instance methods
pass "this" instead of the class name as the 1st callback element.
|
public
string
|
#
getLogo( )
Returns the relative path from this plugin's directory to the logo for this
plugin. Defaults to views/default/images/logo.png
Returns the relative path from this plugin's directory to the logo for this
plugin. Defaults to views/default/images/logo.png
Returns
string The relative path to the plugin's logo
|
public
|
#
cron( string $key )
Runs the cron task identified by the key used to create the cron task
Runs the cron task identified by the key used to create the cron task
Parameters
- $key
string $key The key used to create the cron task
See
|
public
mixed
|
#
errors( )
Return all validation errors encountered
Return all validation errors encountered
Returns
mixed Boolean false if no errors encountered, an array of errors otherwise
|
Magic methods summary