Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page

Language domain

Language Commands

AddLanguageCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\AddLanguageCommand Adds new language with given data

Command details
Constructor parameters
  • $string $name
  • $string $isoCode
  • $string $tagIETF
  • $string $shortDateFormat
  • $string $fullDateFormat
  • $string $flagImagePath
  • $string $noPictureImagePath
  • $bool $isRtl
  • $bool $isActive
  • $array $shopAssociation
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\AddLanguageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\AddLanguageHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Language\ValueObject\LanguageId

BulkDeleteLanguagesCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\BulkDeleteLanguagesCommand Deletes given languages

Command details
Constructor parameters
  • $array $languageIds
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\BulkDeleteLanguagesHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\BulkDeleteLanguagesHandlerInterface
Return type void

BulkToggleLanguagesStatusCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\BulkToggleLanguagesStatusCommand Enables/disables languages status

Command details
Constructor parameters
  • $array $languageIds
  • $bool $expectedStatus
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\BulkToggleLanguagesStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\BulkToggleLanguagesStatusHandlerInterface
Return type void

DeleteLanguageCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\DeleteLanguageCommand Deletes given languages

Command details
Constructor parameters
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\DeleteLanguageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\DeleteLanguageHandlerInterface
Return type void

EditLanguageCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\EditLanguageCommand Edits given language with provided data

Command details
Constructor parameters
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\EditLanguageHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\EditLanguageHandlerInterface
Return type void

ToggleLanguageStatusCommand

PrestaShop\PrestaShop\Core\Domain\Language\Command\ToggleLanguageStatusCommand Enables or disables language based in given status

Command details
Constructor parameters
  • $int $languageId
  • $bool $expectedStatus
Handler class PrestaShop\PrestaShop\Adapter\Language\CommandHandler\ToggleLanguageStatusHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\CommandHandler\ToggleLanguageStatusHandlerInterface
Return type void

Language Queries

GetLanguageForEditing

PrestaShop\PrestaShop\Core\Domain\Language\Query\GetLanguageForEditing Gets language for editing in Back Office

Query details
Constructor parameters
  • $int $languageId
Handler class PrestaShop\PrestaShop\Adapter\Language\QueryHandler\GetLanguageForEditingHandler

Implements:

  • PrestaShop\PrestaShop\Core\Domain\Language\QueryHandler\GetLanguageForEditingHandlerInterface
Return type PrestaShop\PrestaShop\Core\Domain\Language\QueryResult\EditableLanguage