JPluginHelper
Plugin helper class
| package |
Joomla.Platform |
|---|---|
| subpackage |
Plugin |
| since |
11.1 |
Methods
_import
Loads the plugin file.
_import( &$plugin, boolean $autocreate = true, \JDispatcher $dispatcher = null) : boolean
| 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
| 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
| 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
| 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
| 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.
| since |
11.3 |
|---|
Type(s)
array