public function DataPolicyTranslationHandler::entityFormAlter in Data Policy 8
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
- src/
DataPolicyTranslationHandler.php, line 17
Class
- DataPolicyTranslationHandler
- Defines the translation handler for data_policy.
Namespace
Drupal\data_policyCode
public function entityFormAlter(array &$form, FormStateInterface $form_state, EntityInterface $entity) {
parent::entityFormAlter($form, $form_state, $entity);
if (isset($form['content_translation'])) {
// We do not need to show these values to simplify UI: they
// inherit the basic entity property values.
$form['content_translation']['#access'] = FALSE;
}
}