class InstallLanguageCommand extends Command (View source)

Constants

RETURN_CODE_ON_FAILURE

The return code we should return when an exception is thrown while running the command.

Properties

protected Application|null $app
protected TranslationsChecker|null $translationsChecker
protected TranslationsInstaller|null $translationsInstaller
protected OutputInterface|null $output
protected bool|null $shouldClearLocalizationCache

Methods

run(InputInterface $input, OutputInterface $output)

{@inheritdoc}

from  Command
writeError(OutputInterface $output, Exception|Throwable $error)

Write an exception.

from  Command
addEnvOption()

Add the "env" option to the command options.

from  Command
configure()

No description

execute(InputInterface $input, OutputInterface $output)

No description

bool
checkCoreFlag(InputInterface $input)

No description

checkPackagesFlag(InputInterface $input)

No description

getTranslationsData(bool $processCore, array $processPackages)

No description

updateLanguages(array $data)

No description

int
updateLanguagesFor(array $installedOutdated, Package $package = null)

No description

addLanguages(array $data, array $localeIDs)

No description

addLanguage(array $data, $localeID)

No description

bool
addLanguageFor(array $availableRemoteStats, $localeID, Package $package = null)

No description

Details

run(InputInterface $input, OutputInterface $output)

{@inheritdoc}

Parameters

InputInterface $input
OutputInterface $output

protected writeError(OutputInterface $output, Exception|Throwable $error)

Write an exception.

Parameters

OutputInterface $output
Exception|Throwable $error

protected Command addEnvOption()

Add the "env" option to the command options.

Return Value

Command

protected configure()

No description

protected execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

private bool checkCoreFlag(InputInterface $input)

No description

Parameters

InputInterface $input

Return Value

bool

private Package checkPackagesFlag(InputInterface $input)

No description

Parameters

InputInterface $input

Return Value

Package

private LocaleStatus[] getTranslationsData(bool $processCore, array $processPackages)

No description

Parameters

bool $processCore
array $processPackages

Return Value

LocaleStatus[]

private updateLanguages(array $data)

No description

Parameters

array $data

private int updateLanguagesFor(array $installedOutdated, Package $package = null)

No description

Parameters

array $installedOutdated
Package $package

Return Value

int

private addLanguages(array $data, array $localeIDs)

No description

Parameters

array $data
array $localeIDs

private addLanguage(array $data, $localeID)

No description

Parameters

array $data
$localeID

private bool addLanguageFor(array $availableRemoteStats, $localeID, Package $package = null)

No description

Parameters

array $availableRemoteStats
$localeID
Package $package

Return Value

bool