class PmCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected $configFactory
protected $moduleInstaller
protected $themeHandler

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(ConfigFactoryInterface $configFactory, ModuleInstallerInterface $moduleInstaller, ThemeHandlerInterface $themeHandler)

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

ConfigFactoryInterface
getConfigFactory()

No description

ModuleInstallerInterface
getModuleInstaller()

No description

ThemeHandlerInterface
getThemeHandler()

No description

enable(array $modules)

Enable one or more modules.

uninstall(array $modules)

Uninstall one or more modules and their dependent modules.

validateUninstall(CommandData $commandData)

No description

RowsOfFields
pmList($options = ['format' => 'table', 'type' => 'module,theme', 'status' => 'enabled,disabled', 'package' => self::REQ, 'core' => false, 'no-core' => false])

Show a list of available extensions (modules and themes).

String
extensionStatus($extension)

Calculate an extension status based on current status and schema version.

addInstallDependencies($modules)

No description

addUninstallDependencies($modules)

No description

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(ConfigFactoryInterface $configFactory, ModuleInstallerInterface $moduleInstaller, ThemeHandlerInterface $themeHandler)

Parameters

ConfigFactoryInterface $configFactory
ModuleInstallerInterface $moduleInstaller
ThemeHandlerInterface $themeHandler

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

ConfigFactoryInterface getConfigFactory()

Return Value

ConfigFactoryInterface

ModuleInstallerInterface getModuleInstaller()

Return Value

ModuleInstallerInterface

ThemeHandlerInterface getThemeHandler()

Return Value

ThemeHandlerInterface

enable(array $modules)

Enable one or more modules.

Parameters

array $modules A comma delimited list of modules.

uninstall(array $modules)

Uninstall one or more modules and their dependent modules.

Parameters

array $modules A comma delimited list of modules.

validateUninstall(CommandData $commandData)

Parameters

CommandData $commandData

RowsOfFields pmList($options = ['format' => 'table', 'type' => 'module,theme', 'status' => 'enabled,disabled', 'package' => self::REQ, 'core' => false, 'no-core' => false])

Show a list of available extensions (modules and themes).

Parameters

$options

Return Value

RowsOfFields

String extensionStatus($extension)

Calculate an extension status based on current status and schema version.

Parameters

$extension Object of a single extension info.

Return Value

String describing extension status. Values: enabled|disabled.

addInstallDependencies($modules)

Parameters

$modules

addUninstallDependencies($modules)

Parameters

$modules