You are here

public function ProfileTranslationHandler::entityFormAlter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/ProfileTranslationHandler.php \Drupal\user\ProfileTranslationHandler::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/user/src/ProfileTranslationHandler.php, line 38
Contains \Drupal\user\ProfileTranslationHandler.

Class

ProfileTranslationHandler
Defines the translation handler for users.

Namespace

Drupal\user

Code

public function entityFormAlter(array &$form, FormStateInterface $form_state, EntityInterface $entity) {
  parent::entityFormAlter($form, $form_state, $entity);
  $form['actions']['submit']['#submit'][] = array(
    $this,
    'entityFormSave',
  );
}