public function BlockContentTranslationHandler::entityFormAlter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/block_content/src/BlockContentTranslationHandler.php \Drupal\block_content\BlockContentTranslationHandler::entityFormAlter()
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 23 - Contains \Drupal\block_content\BlockContentTranslationHandler.
Class
- BlockContentTranslationHandler
- Defines the translation handler for custom blocks.
Namespace
Drupal\block_contentCode
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',
),
),
);
}
}