class PluginHelper

Plugin helper class

Methods

static  string
getLayoutPath( string $type, string $name, string $layout = 'default')

Get the path to a layout from a Plugin

static  mixed
getPlugin( string $type, string $plugin = null)

Get the plugin data of a specific type if no specific plugin is specified otherwise only the specific plugin data is returned.

static  boolean
isEnabled( string $type, string $plugin = null)

Checks if a plugin is enabled.

static  boolean
importPlugin( string $type, string $plugin = null, boolean $autocreate = true, JEventDispatcher $dispatcher = null)

Loads all the plugin files for a particular type if no specific plugin is specified otherwise only the specific plugin is loaded.

Details

static string getLayoutPath( string $type, string $name, string $layout = 'default')

Get the path to a layout from a Plugin

Parameters

string $type Plugin type
string $name Plugin name
string $layout Layout name

Return Value

string Layout path

static mixed getPlugin( string $type, string $plugin = null)

Get the plugin data of a specific type if no specific plugin is specified otherwise only the specific plugin data is returned.

Parameters

string $type The plugin type, relates to the subdirectory in the plugins directory.
string $plugin The plugin name.

Return Value

mixed An array of plugin data objects, or a plugin data object.

static boolean isEnabled( string $type, string $plugin = null)

Checks if a plugin is enabled.

Parameters

string $type The plugin type, relates to the subdirectory in the plugins directory.
string $plugin The plugin name.

Return Value

boolean

static boolean importPlugin( string $type, string $plugin = null, boolean $autocreate = true, JEventDispatcher $dispatcher = null)

Loads all the plugin files for a particular type if no specific plugin is specified otherwise only the specific plugin is loaded.

Parameters

string $type The plugin type, relates to the subdirectory in the plugins directory.
string $plugin The plugin name.
boolean $autocreate Autocreate the plugin.
JEventDispatcher $dispatcher Optionally allows the plugin to use a different dispatcher.

Return Value

boolean True on success.