function UserPasswordForm::__construct

Same name and namespace in other branches
  1. 9 core/modules/user/src/Form/UserPasswordForm.php \Drupal\user\Form\UserPasswordForm::__construct()
  2. 8.9.x core/modules/user/src/Form/UserPasswordForm.php \Drupal\user\Form\UserPasswordForm::__construct()
  3. 10 core/modules/user/src/Form/UserPasswordForm.php \Drupal\user\Form\UserPasswordForm::__construct()

Constructs a UserPasswordForm object.

Parameters

\Drupal\user\UserStorageInterface $user_storage: The user storage.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Config\ConfigFactory $config_factory: The config factory.

\Drupal\Core\Flood\FloodInterface $flood: The flood service.

\Drupal\user\UserNameValidator $userNameValidator: The user validator service.

\Drupal\Component\Utility\EmailValidatorInterface $email_validator: The email validator service.

File

core/modules/user/src/Form/UserPasswordForm.php, line 70

Class

UserPasswordForm
Provides a user password reset form.

Namespace

Drupal\user\Form

Code

public function __construct(UserStorageInterface $user_storage, LanguageManagerInterface $language_manager, ConfigFactory $config_factory, FloodInterface $flood, UserNameValidator $userNameValidator, EmailValidatorInterface $email_validator) {
    $this->userStorage = $user_storage;
    $this->languageManager = $language_manager;
    $this->configFactory = $config_factory;
    $this->flood = $flood;
    $this->emailValidator = $email_validator;
}

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