public BlockContentTranslationHandler::entityFormAlter(array &$form, FormStateInterface $form_state, EntityInterface $entity)
Performs the needed alterations to the entity form.
Parameters
array $form: The entity form to be altered to provide the translation workflow.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\Core\Entity\EntityInterface $entity: The entity being created or edited.
Overrides ContentTranslationHandler::entityFormAlter
File
- core/modules/block_content/src/BlockContentTranslationHandler.php, line 18
Class
- BlockContentTranslationHandler
- Defines the translation handler for custom blocks.
Namespace
Drupal\block_content
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 | public function entityFormAlter( array & $form , FormStateInterface $form_state , EntityInterface $entity ) { parent::entityFormAlter( $form , $form_state , $entity ); // Move the translation fieldset to a vertical tab. if (isset( $form [ 'translation' ])) { $form [ 'translation' ] += array ( '#group' => 'additional_settings' , '#weight' => 100, '#attributes' => array ( 'class' => array ( 'block-content-translation-options' ), ), ); } } |
Please login to continue.