You are here

public function ContentTranslationManager::setBundleTranslationSettings in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_translation/src/ContentTranslationManager.php \Drupal\content_translation\ContentTranslationManager::setBundleTranslationSettings()

Sets translation settings for the specified bundle.

Parameters

string $entity_type_id: The entity type identifier.

string $bundle: The bundle name.

array $settings: An associative array of values keyed by setting name.

Overrides BundleTranslationSettingsInterface::setBundleTranslationSettings

File

core/modules/content_translation/src/ContentTranslationManager.php, line 111

Class

ContentTranslationManager
Provides common functionality for content translation.

Namespace

Drupal\content_translation

Code

public function setBundleTranslationSettings($entity_type_id, $bundle, array $settings) {
  $config = $this
    ->loadContentLanguageSettings($entity_type_id, $bundle);
  $config
    ->setThirdPartySetting('content_translation', 'bundle_settings', $settings)
    ->save();
}