class ConfigImportCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

EXIT_FAILURE_WITH_CLARITY

Properties

protected CommandData $commandData from  DrushCommands
protected ConfigManagerInterface $configManager
protected $configStorage
protected $configStorageSync
protected $configCache
protected $eventDispatcher
protected $lock
protected $configTyped
protected $moduleInstaller
protected $themeHandler
protected $stringTranslation
protected $importStorageTransformer
protected ModuleHandlerInterface $moduleHandler
protected ModuleExtensionList $moduleExtensionList The module extension list.

Methods

getConfig()

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

__construct(ConfigManagerInterface $configManager, StorageInterface $configStorage, StorageInterface $configStorageSync, CacheBackendInterface $configCache, ModuleHandlerInterface $moduleHandler, EventDispatcherInterface $eventDispatcher, LockBackendInterface $lock, TypedConfigManagerInterface $configTyped, ModuleInstallerInterface $moduleInstaller, ThemeHandlerInterface $themeHandler, TranslationInterface $stringTranslation, ModuleExtensionList $moduleExtensionList)

No description

io()

Override Robo's IO function with our custom style.

LoggerInterface
logger()

Returns a logger object.

printFile(string $file)

Print the contents of a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

HandlerStack
getStack()

Get a Guzzle handler stack that uses the Drush logger.

ConfigManagerInterface
getConfigManager()

No description

StorageInterface
getConfigStorage()

No description

StorageInterface
getConfigStorageSync()

No description

CacheBackendInterface
getConfigCache()

No description

ModuleHandlerInterface
getModuleHandler()

No description

EventDispatcherInterface
getEventDispatcher()

No description

LockBackendInterface
getLock()

No description

TypedConfigManagerInterface
getConfigTyped()

No description

ModuleInstallerInterface
getModuleInstaller()

No description

ThemeHandlerInterface
getThemeHandler()

No description

TranslationInterface
getStringTranslation()

No description

setImportTransformer(ImportStorageTransformer $importStorageTransformer)

No description

bool
hasImportTransformer()

No description

ImportStorageTransformer
getImportTransformer()

No description

ModuleExtensionList
getModuleExtensionList()

No description

bool|void
import(string $label = null, array $options = ['preview' => 'list', 'source' => self::REQ, 'partial' => false, 'diff' => false])

Import config from a config directory.

doImport($storage_comparer)

No description

CommandError|null
validate(CommandData $commandData)

No description

Details

DrushConfig getConfig()

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

__construct(ConfigManagerInterface $configManager, StorageInterface $configStorage, StorageInterface $configStorageSync, CacheBackendInterface $configCache, ModuleHandlerInterface $moduleHandler, EventDispatcherInterface $eventDispatcher, LockBackendInterface $lock, TypedConfigManagerInterface $configTyped, ModuleInstallerInterface $moduleInstaller, ThemeHandlerInterface $themeHandler, TranslationInterface $stringTranslation, ModuleExtensionList $moduleExtensionList)

Parameters

ConfigManagerInterface $configManager
StorageInterface $configStorage
StorageInterface $configStorageSync
CacheBackendInterface $configCache
ModuleHandlerInterface $moduleHandler
EventDispatcherInterface $eventDispatcher
LockBackendInterface $lock
TypedConfigManagerInterface $configTyped
ModuleInstallerInterface $moduleInstaller
ThemeHandlerInterface $themeHandler
TranslationInterface $stringTranslation
ModuleExtensionList $moduleExtensionList

protected io()

Override Robo's IO function with our custom style.

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

Parameters

CommandData $commandData

protected printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

Parameters

CommandData $commandData Full path to a file.

protected HandlerStack getStack()

Get a Guzzle handler stack that uses the Drush logger.

ConfigManagerInterface getConfigManager()

Return Value

ConfigManagerInterface

StorageInterface getConfigStorage()

Return Value

StorageInterface

StorageInterface getConfigStorageSync()

Return Value

StorageInterface

CacheBackendInterface getConfigCache()

Return Value

CacheBackendInterface

ModuleHandlerInterface getModuleHandler()

Return Value

ModuleHandlerInterface

EventDispatcherInterface getEventDispatcher()

Return Value

EventDispatcherInterface

LockBackendInterface getLock()

Return Value

LockBackendInterface

TypedConfigManagerInterface getConfigTyped()

Return Value

TypedConfigManagerInterface

ModuleInstallerInterface getModuleInstaller()

Return Value

ModuleInstallerInterface

ThemeHandlerInterface getThemeHandler()

Return Value

ThemeHandlerInterface

TranslationInterface getStringTranslation()

Return Value

TranslationInterface

setImportTransformer(ImportStorageTransformer $importStorageTransformer)

Parameters

ImportStorageTransformer $importStorageTransformer

bool hasImportTransformer()

Return Value

bool

ImportStorageTransformer getImportTransformer()

Return Value

ImportStorageTransformer

ModuleExtensionList getModuleExtensionList()

Return Value

ModuleExtensionList

bool|void import(string $label = null, array $options = ['preview' => 'list', 'source' => self::REQ, 'partial' => false, 'diff' => false])

Import config from a config directory.

Parameters

string $label A config directory label (i.e. a key in \$config_directories array in settings.php).
array $options

Return Value

bool|void

Exceptions

StorageTransformerException
UserAbortException

doImport($storage_comparer)

Parameters

$storage_comparer

CommandError|null validate(CommandData $commandData)

Parameters

CommandData $commandData

Return Value

CommandError|null