PHP Class NerdsAndCompany\Schematic\Services\Plugins

Sync Craft Setups.
Author: Nerds & Company
Inheritance: extends Base
Mostra file Open project: itmundi/schematic Class Usage Examples

Public Methods

Method Description
export ( array $data = [] ) : array
import ( array $pluginDefinitions, boolean $force = false ) : Result

Protected Methods

Method Description
getPlugin ( string $handle ) : Craft\BasePlugin | null Returns plugin by handle.
getPluginService ( ) : PluginsService
getUpdatesService ( ) : UpdatesService
installPluginByHandle ( string $handle ) Installs plugin by handle.
runMigrations ( string $handle ) Run plugin migrations automatically.
togglePluginByHandle ( string $handle, boolean $isEnabled ) Toggles plugin based on enabled flag.
uninstallPluginByHandle ( $handle ) Uninstalls plugin by handle.

Private Methods

Method Description
getPluginDefinition ( Craft\BasePlugin $plugin ) : array

Method Details

export() public method

public export ( array $data = [] ) : array
$data array
return array

getPlugin() protected method

Returns plugin by handle.
protected getPlugin ( string $handle ) : Craft\BasePlugin | null
$handle string
return Craft\BasePlugin | null

getPluginService() protected method

protected getPluginService ( ) : PluginsService
return PluginsService

getUpdatesService() protected method

protected getUpdatesService ( ) : UpdatesService
return UpdatesService

import() public method

public import ( array $pluginDefinitions, boolean $force = false ) : Result
$pluginDefinitions array
$force boolean
return Result

installPluginByHandle() protected method

Installs plugin by handle.
protected installPluginByHandle ( string $handle )
$handle string

runMigrations() protected method

Run plugin migrations automatically.
protected runMigrations ( string $handle )
$handle string

togglePluginByHandle() protected method

Toggles plugin based on enabled flag.
protected togglePluginByHandle ( string $handle, boolean $isEnabled )
$handle string
$isEnabled boolean

uninstallPluginByHandle() protected method

Uninstalls plugin by handle.
protected uninstallPluginByHandle ( $handle )
$handle