class LocaleCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected $languageManager
protected $configFactory
protected $moduleHandler
protected $state

Methods

getConfig()

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

__construct(LanguageManagerInterface $languageManager, ConfigFactoryInterface $configFactory, ModuleHandlerInterface $moduleHandler, StateInterface $state)

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.

LanguageManagerInterface
getLanguageManager()

No description

ConfigFactoryInterface
getConfigFactory()

No description

ModuleHandlerInterface
getModuleHandler()

No description

mixed
getState()

No description

check()

Checks for available translation updates.

update($options = ['langcodes' => self::REQ])

Imports the available translation updates.

import($langcode, $file, $options = ['type' => self::OPT, 'override' => self::OPT])

Imports to a gettext translation file.

Details

DrushConfig getConfig()

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

__construct(LanguageManagerInterface $languageManager, ConfigFactoryInterface $configFactory, ModuleHandlerInterface $moduleHandler, StateInterface $state)

Parameters

LanguageManagerInterface $languageManager
ConfigFactoryInterface $configFactory
ModuleHandlerInterface $moduleHandler
StateInterface $state

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.

protected LanguageManagerInterface getLanguageManager()

Return Value

LanguageManagerInterface

protected ConfigFactoryInterface getConfigFactory()

Return Value

ConfigFactoryInterface

ModuleHandlerInterface getModuleHandler()

Return Value

ModuleHandlerInterface

mixed getState()

Return Value

mixed

check()

Checks for available translation updates.

update($options = ['langcodes' => self::REQ])

Imports the available translation updates.

Parameters

$options

See also

TranslationStatusForm::buildForm()
TranslationStatusForm::prepareUpdateData()
TranslationStatusForm::submitForm()

import($langcode, $file, $options = ['type' => self::OPT, 'override' => self::OPT])

Imports to a gettext translation file.

Parameters

$langcode
$file
$options

Exceptions

Exception