PluginHelper
Plugin helper class
since |
1.5 |
---|
Methods
_import
Loads the plugin file.
_import(object $plugin, boolean $autocreate = true, \JEventDispatcher $dispatcher = null) : void
since |
1.5 |
---|---|
deprecated |
4.0 Use PluginHelper::import() instead |
Arguments
- $plugin
object
The plugin.- $autocreate
boolean
True to autocreate.- $dispatcher
\JEventDispatcher
Optionally allows the plugin to use a different dispatcher.
_load
Loads the published plugins.
_load() : array
since |
1.5 |
---|---|
deprecated |
4.0 Use PluginHelper::load() instead |
Response
array
An array of published plugins
getLayoutPath
Get the path to a layout from a Plugin
getLayoutPath(string $type, string $name, string $layout = 'default') : string
since |
3.0 |
---|
Arguments
- $type
string
Plugin type- $name
string
Plugin name- $layout
string
Layout name
Response
string
Layout path
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 |
1.5 |
---|
Arguments
- $type
string
The plugin type, relates to the subdirectory in the plugins directory.- $plugin
string
The plugin name.
Response
mixed
An array of plugin data objects, or a plugin data object.
import
Loads the plugin file.
import(object $plugin, boolean $autocreate = true, \JEventDispatcher $dispatcher = null) : void
since |
3.2 |
---|
Arguments
- $plugin
object
The plugin.- $autocreate
boolean
True to autocreate.- $dispatcher
\JEventDispatcher
Optionally allows the plugin to use a different dispatcher.
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, \JEventDispatcher $dispatcher = null) : boolean
since |
1.5 |
---|
Arguments
- $type
string
The plugin type, relates to the subdirectory in the plugins directory.- $plugin
string
The plugin name.- $autocreate
boolean
Autocreate the plugin.- $dispatcher
\JEventDispatcher
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 |
1.5 |
---|
Arguments
- $type
string
The plugin type, relates to the subdirectory in the plugins directory.- $plugin
string
The plugin name.
Response
boolean
load
Loads the published plugins.
load() : array
since |
3.2 |
---|
Response
array
An array of published plugins
Properties
plugins
A persistent cache of the loaded plugins.
since |
1.7 |
---|
Type(s)
array