PHP Class Habari\Plugin

Template plugin object which specific plugin objects should extend This object provides the basic constructor used to ensure that plugin actions are registered against the appropriate dispatcher
Inheritance: extends Pluggable
Exibir arquivo Open project: habari/system

Public Methods

Method Description
__construct ( ) Plugin constructor.
_help_plugin_config_plugin ( array $actions, string $plugin_id ) : array Registered to the plugin_config hook to supply help via a plugin's help in xml
_help_plugin_ui_plugin ( string $plugin_id, string $action ) Registered to the plugin_ui hook to supply help via a plugin's help in xml
get_version ( ) : string Provide a method to return the version number from the plugin xml
info ( ) Loads a theme's metadata from an XML file in theme's directory.

Method Details

__construct() final public method

Plugins should not define their own constructors, because they are instantiated to extract plugin info. Instead, include a sink for a "init" hook which is executed immediately after the plugin is loaded during normal execution.
final public __construct ( )

_help_plugin_config_plugin() public method

Registered to the plugin_config hook to supply help via a plugin's help in xml
public _help_plugin_config_plugin ( array $actions, string $plugin_id ) : array
$actions array An array of actions applicable to this plugin
$plugin_id string The plugin id to which the actions belong
return array The modified array of actions

_help_plugin_ui_plugin() public method

Registered to the plugin_ui hook to supply help via a plugin's help in xml
public _help_plugin_ui_plugin ( string $plugin_id, string $action )
$plugin_id string The id of the plugin whose action was triggered
$action string The action triggered

get_version() public method

Provide a method to return the version number from the plugin xml
public get_version ( ) : string
return string The plugin version from XML

info() final public method

Loads a theme's metadata from an XML file in theme's directory.
final public info ( )