PluginHelper
Plugin helper class
since |
1.5 |
---|---|
package |
Joomla CMS |
Methods
getLayoutPath
Get the path to a layout from a Plugin
getLayoutPath( type, name, layout = 'default') :
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( type, plugin = null) :
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( plugin, autocreate = true, \Joomla\Event\DispatcherInterface dispatcher = null) :
since |
3.2 |
---|
Arguments
- plugin
object
The plugin.- autocreate
bool
True to autocreate.- dispatcher
DispatcherInterface
Optionally allows the plugin to use a different dispatcher.
Response
void
importPlugin
Loads all the plugin files for a particular type if no specific plugin is specified otherwise only the specific plugin is loaded.
importPlugin( type, plugin = null, autocreate = true, \Joomla\Event\DispatcherInterface dispatcher = null) :
since |
1.5 |
---|
Arguments
- type
string
The plugin type, relates to the subdirectory in the plugins directory.- plugin
string
The plugin name.- autocreate
bool
Autocreate the plugin.- dispatcher
DispatcherInterface
Optionally allows the plugin to use a different dispatcher.
Response
bool
True on success.
isEnabled
Checks if a plugin is enabled.
isEnabled( type, plugin = null) :
since |
1.5 |
---|
Arguments
- type
string
The plugin type, relates to the subdirectory in the plugins directory.- plugin
string
The plugin name.
Response
bool
load
Loads the published plugins.
load() : mixed||string|int
since |
3.2 |
---|
Response
array<string|int, mixed>
An array of published plugins
Properties
plugins
A persistent cache of the loaded plugins.
since |
1.7 |
---|
Type(s)
array<string|int, mixed>|null