AccountForm::getEditedFieldNames

protected AccountForm::getEditedFieldNames(FormStateInterface $form_state)

Gets the names of all fields edited in the form.

If the entity form customly adds some fields to the form (i.e. without using the form display), it needs to add its fields here and override flagViolations() for displaying the violations.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

string[] An array of field names.

Overrides ContentEntityForm::getEditedFieldNames

File

core/modules/user/src/AccountForm.php, line 346

Class

AccountForm
Form controller for the user account forms.

Namespace

Drupal\user

Code

protected function getEditedFieldNames(FormStateInterface $form_state) {
  return array_merge(array(
    'name',
    'pass',
    'mail',
    'timezone',
    'langcode',
    'preferred_langcode',
    'preferred_admin_langcode'
  ), parent::getEditedFieldNames($form_state));
}
doc_Drupal
2016-10-29 08:42:42
Comments
Leave a Comment

Please login to continue.