Back to Joomla project (class list)

Class PluginHelper - list of methods

Plugin helper class
Package: Joomla\CMS\Plugin
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Plugin/PluginHelper.php
Project: Joomla

Method Summary

public static string
(mixed $type, mixed $name, mixed $layout = 'default')

Get the path to a layout from a Plugin
Parameters
  • string $type Plugin type
  • string $name Plugin name
  • string $layout Layout name
Returns
  • string Layout path
Since
  • 3.0
Show source code of this method: getLayoutPath Source Code

public static mixed
(mixed $type, mixed $plugin = null)

Get the plugin data of a specific type if no specific plugin is specified otherwise only the specific plugin data is returned.
Parameters
  • string $type The plugin type, relates to the subdirectory in the plugins directory.
  • string $plugin The plugin name.
Returns
  • mixed An array of plugin data objects, or a plugin data object.
Since
  • 1.5
Show source code of this method: getPlugin Source Code

public static bool
(mixed $type, mixed $plugin = null)

Checks if a plugin is enabled.
Parameters
  • string $type The plugin type, relates to the subdirectory in the plugins directory.
  • string $plugin The plugin name.
Returns
  • bool
Since
  • 1.5
Show source code of this method: isEnabled Source Code

public static bool
(mixed $type, mixed $plugin = null, mixed $autocreate = true, \Joomla\Event\DispatcherInterface $dispatcher = null)

Loads all the plugin files for a particular type if no specific plugin is specified otherwise only the specific plugin is loaded.
Parameters
  • string $type The plugin type, relates to the subdirectory in the plugins directory.
  • string $plugin The plugin name.
  • bool $autocreate Autocreate the plugin.
  • \Joomla\Event\DispatcherInterface $dispatcher Optionally allows the plugin to use a different dispatcher.
Returns
  • bool True on success.
Since
  • 1.5
Show source code of this method: importPlugin Source Code

protected static void
(mixed $plugin, mixed $autocreate = true, \Joomla\Event\DispatcherInterface $dispatcher = null)

Loads the plugin file.
Parameters
  • object $plugin The plugin.
  • bool $autocreate True to autocreate.
  • \Joomla\Event\DispatcherInterface $dispatcher Optionally allows the plugin to use a different dispatcher.
Returns
  • void
Since
  • 3.2
Show source code of this method: import Source Code

protected static array
()

Loads the published plugins.
Returns
  • array An array of published plugins
Since
  • 3.2
Show source code of this method: load Source Code

Properties Summary

protected static array|null
$plugins
A persistent cache of the loaded plugins.
Since
  • 1.7

Tags Summary

Since
1.5