PluginsVariable
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\PluginsVariable
- Since
- 1.0
Plugin functions.
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getPlugin() | Returns a plugin by its class handle. |
getPluginIconUrl() | Returns a given plugin’s icon URL. |
getPlugins() | Returns all plugins. |
# getPlugin()
Returns a plugin by its class handle.
View source (opens new window)
Arguments
$class
(string (opens new window))$enabledOnly
(boolean (opens new window))
Returns
Signature
public Craft\PluginVariable, null getPlugin ( $class, $enabledOnly = true )
# getPluginIconUrl()
Returns a given plugin’s icon URL.
View source (opens new window)
Arguments
$pluginHandle
(string (opens new window)) – The plugin’s class handle$size
(integer (opens new window)) – The size of the icon
Returns
Signature
public string getPluginIconUrl ( $pluginHandle, $size = 100 )
# getPlugins()
Returns all plugins.
View source (opens new window)
Arguments
$enabledOnly
(boolean (opens new window))
Returns
Signature
public array getPlugins ( $enabledOnly = true )