PluginsHelper
in package
Helper for operations related to plugins
Tags
Table of Contents
- $readFromYaml : bool
- This is needed to know where we should look for project config, either in yaml or in internal config.
- $installed : array<string|int, mixed>
- Copy of the config plugins.themes.themesInstalled to track it internally
- $reinstallQueued : bool
- Has a reinstall job been queued
- afterDisable() : mixed
- After a plugin is disabled
- afterEnable() : mixed
- After a plugin is enabled
- afterInstall() : mixed
- After a plugin is installed
- beforeDisable() : mixed
- Before a plugin is disabled
- beforeEnable() : mixed
- Before a plugin is enabled
- beforeInstall() : mixed
- Before a plugin is installed
- beforeUninstall() : mixed
- Before a plugin is uninstalled
- onThemesEditionChanged() : mixed
- When themes edition is changed
- installTheme() : mixed
- Install a theme's data
- reinstallLayouts() : mixed
- Reinstall all layouts through a job
- uninstallTheme() : mixed
- Uninstall a theme's data
Properties
$readFromYaml
This is needed to know where we should look for project config, either in yaml or in internal config.
public
static bool
$readFromYaml
= true
In a test environment, project config is not written to yaml files so we need to force looking into internal one.
$installed
Copy of the config plugins.themes.themesInstalled to track it internally
private
static array<string|int, mixed>
$installed
$reinstallQueued
Has a reinstall job been queued
private
static bool
$reinstallQueued
= false
Methods
afterDisable()
After a plugin is disabled
public
static afterDisable(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —afterEnable()
After a plugin is enabled
public
static afterEnable(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —afterInstall()
After a plugin is installed
public
static afterInstall(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —beforeDisable()
Before a plugin is disabled
public
static beforeDisable(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —beforeEnable()
Before a plugin is enabled
public
static beforeEnable(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —beforeInstall()
Before a plugin is installed
public
static beforeInstall(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —beforeUninstall()
Before a plugin is uninstalled
public
static beforeUninstall(PluginInterface $plugin) : mixed
Parameters
- $plugin : PluginInterface
Return values
mixed —onThemesEditionChanged()
When themes edition is changed
public
static onThemesEditionChanged(array<string|int, mixed> $oldEdition, string $newEdition) : mixed
Parameters
- $oldEdition : array<string|int, mixed>
- $newEdition : string
Return values
mixed —installTheme()
Install a theme's data
private
static installTheme(ThemeInterface $theme) : mixed
Parameters
- $theme : ThemeInterface
Return values
mixed —reinstallLayouts()
Reinstall all layouts through a job
private
static reinstallLayouts() : mixed
Return values
mixed —uninstallTheme()
Uninstall a theme's data
private
static uninstallTheme(ThemeInterface $theme) : mixed
Parameters
- $theme : ThemeInterface