You are here

class ContentTranslationDefaultsConfigOverride in Open Social 10.0.x

Same name in this branch
  1. 10.0.x modules/social_features/social_landing_page/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_landing_page\ContentTranslationDefaultsConfigOverride
  2. 10.0.x modules/social_features/social_page/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_page\ContentTranslationDefaultsConfigOverride
  3. 10.0.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  4. 10.0.x modules/social_features/social_event/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_event\ContentTranslationDefaultsConfigOverride
Same name and namespace in other branches
  1. 8.9 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  2. 8.4 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  3. 8.5 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  4. 8.6 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  5. 8.7 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  6. 8.8 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  7. 10.3.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  8. 10.1.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
  9. 10.2.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride

Provides content translation defaults for the book content type.

@package Drupal\social_book

Hierarchy

Expanded class hierarchy of ContentTranslationDefaultsConfigOverride

1 string reference to 'ContentTranslationDefaultsConfigOverride'
social_book.services.yml in modules/social_features/social_book/social_book.services.yml
modules/social_features/social_book/social_book.services.yml
1 service uses ContentTranslationDefaultsConfigOverride
social_book.translation_defaults in modules/social_features/social_book/social_book.services.yml
Drupal\social_book\ContentTranslationDefaultsConfigOverride

File

modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php, line 13

Namespace

Drupal\social_book
View source
class ContentTranslationDefaultsConfigOverride extends ContentTranslationConfigOverrideBase {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  protected function getModule() {
    return 'social_book';
  }

  /**
   * {@inheritdoc}
   */
  protected function getDisplayName() {

    // We can't use dependency injection here because it causes a circular
    // dependency for the configuration override.
    return $this
      ->t('Book Pages');
  }

  /**
   * {@inheritdoc}
   */
  protected function getTranslationOverrides() {
    return [
      'language.content_settings.node.book' => [
        'third_party_settings' => [
          'content_translation' => [
            'enabled' => TRUE,
          ],
        ],
      ],
      'core.base_field_override.node.book.title' => [
        'translatable' => TRUE,
      ],
      'core.base_field_override.node.book.menu_link' => [
        'translatable' => TRUE,
      ],
      'core.base_field_override.node.book.path' => [
        'translatable' => TRUE,
      ],
      'field.field.node.book.body' => [
        'translatable' => TRUE,
      ],
      'field.field.node.book.field_book_image' => [
        'third_party_settings' => [
          'content_translation' => [
            'translation_sync' => [
              'file' => 'file',
              'alt' => '0',
              'title' => '0',
            ],
          ],
        ],
        'translatable' => TRUE,
      ],
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContentTranslationConfigOverrideBase::createConfigObject public function Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface::createConfigObject
ContentTranslationConfigOverrideBase::getCacheableMetadata public function Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface::getCacheableMetadata
ContentTranslationConfigOverrideBase::getCacheSuffix public function The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface::getCacheSuffix
ContentTranslationConfigOverrideBase::getOverriddenConfigurations protected function Returns the configurations that are overridden in this class.
ContentTranslationConfigOverrideBase::loadOverrides public function Returns config overrides. Overrides ConfigFactoryOverrideInterface::loadOverrides
ContentTranslationDefaultsConfigOverride::getDisplayName protected function Returns the display name for this set of configuration overrides. Overrides ContentTranslationConfigOverrideBase::getDisplayName
ContentTranslationDefaultsConfigOverride::getModule protected function Returns the module that provides the overrides. Overrides ContentTranslationConfigOverrideBase::getModule
ContentTranslationDefaultsConfigOverride::getTranslationOverrides protected function Returns the configuration override for this module's translations. Overrides ContentTranslationConfigOverrideBase::getTranslationOverrides
StringTranslationTrait::$stringTranslation protected property The string translation service. 4
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.