function PreprocessHooks::preprocessFormElementPasswordConfirm

Same name and namespace in other branches
  1. main core/themes/default_admin/src/Hook/PreprocessHooks.php \Drupal\default_admin\Hook\PreprocessHooks::preprocessFormElementPasswordConfirm()

Implements hook_preprocess_HOOK() for form_element__password_confirm.

Attributes

#[Hook('preprocess_form_element__password_confirm')]

File

core/themes/default_admin/src/Hook/PreprocessHooks.php, line 577

Class

PreprocessHooks
Provides preprocess implementations.

Namespace

Drupal\default_admin\Hook

Code

public function preprocessFormElementPasswordConfirm(array &$variables) : void {
  // Add CSS classes needed for theming the password confirm widget.
  $variables['attributes']['class'][] = 'password-confirm';
  $variables['attributes']['class'][] = 'is-initial';
  $variables['attributes']['class'][] = 'is-password-empty';
  $variables['attributes']['class'][] = 'is-confirm-empty';
}

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