function ProfileTranslationHandler::entityFormAlter

Same name in other branches
  1. 9 core/modules/user/src/ProfileTranslationHandler.php \Drupal\user\ProfileTranslationHandler::entityFormAlter()
  2. 10 core/modules/user/src/ProfileTranslationHandler.php \Drupal\user\ProfileTranslationHandler::entityFormAlter()
  3. 11.x core/modules/user/src/ProfileTranslationHandler.php \Drupal\user\ProfileTranslationHandler::entityFormAlter()

Overrides ContentTranslationHandler::entityFormAlter

File

core/modules/user/src/ProfileTranslationHandler.php, line 33

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'][] = [
        $this,
        'entityFormSave',
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.