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
boolean
True to autocreate.- $dispatcher
\JDispatcher
Optionally allows the plugin to use a different dispatcher.
Response
boolean
True on success.
_load
Loads the published plugins.
_load() : array
since |
11.1 |
---|
Response
array
An 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
string
The plugin type, relates to the sub-directory in the plugins directory.- $plugin
string
The plugin name.
Response
mixed
An 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
string
The plugin type, relates to the sub-directory in the plugins directory.- $plugin
string
The plugin name.- $autocreate
boolean
Autocreate the plugin.- $dispatcher
\JDispatcher
Optionally allows the plugin to use a different dispatcher.
Response
boolean
True on success.
isEnabled
Checks if a plugin is enabled.
isEnabled(string $type, string $plugin = null) : boolean
since |
11.1 |
---|
Arguments
- $type
string
The plugin type, relates to the sub-directory in the plugins directory.- $plugin
string
The plugin name.
Response
boolean
Properties
plugins
A persistent cache of the loaded plugins.
since |
11.3 |
---|
Type(s)
array