function price_configurable_language_insert in Price 8
Same name and namespace in other branches
- 3.x price.module \price_configurable_language_insert()
- 2.0.x price.module \price_configurable_language_insert()
- 2.x price.module \price_configurable_language_insert()
- 3.0.x price.module \price_configurable_language_insert()
Implements hook_ENTITY_TYPE_insert() for 'configurable_language'.
File
- ./
price.module, line 28 - Defines the Currency entity and the Price field.
Code
function price_configurable_language_insert(ConfigurableLanguage $language) {
if (!\Drupal::isConfigSyncing()) {
// Import currency translations for the new language.
$importer = \Drupal::service('price.currency_importer');
$importer
->importTranslations([
$language
->getId(),
]);
}
}