ContentTranslationManager
class ContentTranslationManager implements ContentTranslationManagerInterface, BundleTranslationSettingsInterface (View source)
Provides common functionality for content translation.
Properties
| protected EntityTypeBundleInfoInterface | $entityTypeBundleInfo | The entity type bundle info provider. |
|
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
Methods
Constructs a ContentTranslationManageAccessCheck object.
Returns an instance of the Content translation handler.
Returns an instance of the Content translation metadata.
Checks whether an entity type supports translation.
Gets the entity types that support content translation.
Sets the value for translatability of the given entity type bundle.
Determines whether the given entity type is translatable.
Sets translation settings for the specified bundle.
Returns translation settings for the specified bundle.
Loads a content language config entity based on the entity type and bundle.
Checks whether support for pending revisions should be enabled.
Details
__construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info)
Constructs a ContentTranslationManageAccessCheck object.
ContentTranslationHandlerInterface
getTranslationHandler(string $entity_type_id)
Returns an instance of the Content translation handler.
ContentTranslationMetadataWrapperInterface
getTranslationMetadata(EntityInterface $translation)
Returns an instance of the Content translation metadata.
bool
isSupported(string $entity_type_id)
Checks whether an entity type supports translation.
EntityTypeInterface[]
getSupportedEntityTypes()
Gets the entity types that support content translation.
setEnabled(string $entity_type_id, string $bundle, bool $value)
Sets the value for translatability of the given entity type bundle.
isEnabled(string $entity_type_id, string $bundle = NULL)
Determines whether the given entity type is translatable.
setBundleTranslationSettings(string $entity_type_id, string $bundle, array $settings)
Sets translation settings for the specified bundle.
array
getBundleTranslationSettings(string $entity_type_id, string $bundle)
Returns translation settings for the specified bundle.
protected ContentLanguageSettings
loadContentLanguageSettings(string $entity_type_id, string $bundle)
Loads a content language config entity based on the entity type and bundle.
static bool
isPendingRevisionSupportEnabled(string $entity_type_id, string $bundle_id = NULL)
| internal | There is ongoing discussion about how pending revisions should behave. The logic enabling pending revision support is likely to change once a decision is made. |
Checks whether support for pending revisions should be enabled.