class ContentTranslationDefaultsConfigOverride in Open Social 10.0.x
Same name in this branch
- 10.0.x modules/social_features/social_landing_page/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_landing_page\ContentTranslationDefaultsConfigOverride
- 10.0.x modules/social_features/social_page/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_page\ContentTranslationDefaultsConfigOverride
- 10.0.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 10.0.x modules/social_features/social_event/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_event\ContentTranslationDefaultsConfigOverride
Same name and namespace in other branches
- 8.9 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 8.4 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 8.5 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 8.6 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 8.7 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 8.8 modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 10.3.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 10.1.x modules/social_features/social_book/src/ContentTranslationDefaultsConfigOverride.php \Drupal\social_book\ContentTranslationDefaultsConfigOverride
- 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
- class \Drupal\social_core\ContentTranslationConfigOverrideBase implements ConfigFactoryOverrideInterface
- class \Drupal\social_book\ContentTranslationDefaultsConfigOverride uses StringTranslationTrait
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_bookView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContentTranslationConfigOverrideBase:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
ContentTranslationConfigOverrideBase:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
ContentTranslationConfigOverrideBase:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
ContentTranslationConfigOverrideBase:: |
protected | function | Returns the configurations that are overridden in this class. | |
ContentTranslationConfigOverrideBase:: |
public | function |
Returns config overrides. Overrides ConfigFactoryOverrideInterface:: |
|
ContentTranslationDefaultsConfigOverride:: |
protected | function |
Returns the display name for this set of configuration overrides. Overrides ContentTranslationConfigOverrideBase:: |
|
ContentTranslationDefaultsConfigOverride:: |
protected | function |
Returns the module that provides the overrides. Overrides ContentTranslationConfigOverrideBase:: |
|
ContentTranslationDefaultsConfigOverride:: |
protected | function |
Returns the configuration override for this module's translations. Overrides ContentTranslationConfigOverrideBase:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |