ContentTranslationHandlerInterface
interface ContentTranslationHandlerInterface (View source)
Interface for providing content translation.
Defines a set of methods to allow any entity to be processed by the entity translation UI.
Methods
Returns a set of field definitions to be used to store metadata items.
Checks if the user can perform the given operation on translations of the wrapped entity.
Retrieves the source language for the translation being created.
Performs the needed alterations to the entity form.
Details
FieldDefinitionInterface[]
getFieldDefinitions()
Returns a set of field definitions to be used to store metadata items.
AccessResultInterface
getTranslationAccess(EntityInterface $entity, $op)
Checks if the user can perform the given operation on translations of the wrapped entity.
string
getSourceLangcode(FormStateInterface $form_state)
Retrieves the source language for the translation being created.
retranslate(EntityInterface $entity, string $langcode = NULL)
Marks translations as outdated.
entityFormAlter(array $form, FormStateInterface $form_state, EntityInterface $entity)
Performs the needed alterations to the entity form.