JPluginHelper

Plugin helper class

abstract
package

Joomla.Platform

subpackage

Plugin

since

11.1

Methods

_import

Loads the plugin file.

_import( &$plugin, boolean $autocreate = true, \JDispatcher $dispatcher = null) : boolean
static
since

11.1

Arguments

$plugin

$autocreate

booleanTrue to autocreate.

$dispatcher

\JDispatcherOptionally allows the plugin to use a different dispatcher.

Response

booleanTrue on success.

_load

Loads the published plugins.

_load() : array
static
since

11.1

Response

arrayAn array of published plugins

getPlugin

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

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

11.1

Arguments

$type

stringThe plugin type, relates to the sub-directory in the plugins directory.

$plugin

stringThe plugin name.

Response

mixedAn array of plugin data objects, or a plugin data object.

importPlugin

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

importPlugin(string $type, string $plugin = null, boolean $autocreate = true, \JDispatcher $dispatcher = null) : boolean
static
since

11.1

Arguments

$type

stringThe plugin type, relates to the sub-directory in the plugins directory.

$plugin

stringThe plugin name.

$autocreate

booleanAutocreate the plugin.

$dispatcher

\JDispatcherOptionally allows the plugin to use a different dispatcher.

Response

booleanTrue on success.

isEnabled

Checks if a plugin is enabled.

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

11.1

Arguments

$type

stringThe plugin type, relates to the sub-directory in the plugins directory.

$plugin

stringThe plugin name.

Response

boolean

Properties

plugins

A persistent cache of the loaded plugins.

static
since

11.3

Type(s)

array