Piwik\Plugin\

Manager

The singleton that manages plugin loading/unloading and installation/uninstallation.

Methods

The class defines the following methods:

isPluginActivated()

Returns true if a plugin has been activated.

Signature

  • It accepts the following parameter(s):
    • $name (string) — Name of plugin, eg, 'Actions'.
  • It returns a bool value.

isPluginLoaded()

Returns true if plugin is loaded (in memory).

Signature

  • It accepts the following parameter(s):
    • $name (string) — Name of plugin, eg, 'Acions'.
  • It returns a bool value.

getThemeEnabled()

Returns the currently enabled theme.

If no theme is enabled, the Morpheus plugin is returned (this is the base and default theme).

Signature

loadAllPluginsAndGetTheirInfo()

Returns info regarding all plugins.

Loads plugins that can be loaded.

Signature

  • Returns: array — An array that maps plugin names with arrays of plugin information. Plugin information consists of the following entries: - activated: Whether the plugin is activated. - alwaysActivated: Whether the plugin should always be activated, or not. - uninstallable: Whether the plugin is uninstallable or not. - invalid: If the plugin is invalid, this property will be set to true. If the plugin is not invalid, this property will not exist. - info: If the plugin was loaded, will hold the plugin information. See Plugin::getInformation().

getInstalledPluginsName()

Return names of all installed plugins.

Signature

  • It returns a array value.

getMissingPlugins()

Returns names of plugins that should be loaded, but cannot be since their files cannot be found.

Signature

  • It returns a array value.