function UserPasswordForm::__construct
Same name in other branches
- 8.9.x core/modules/user/src/Form/UserPasswordForm.php \Drupal\user\Form\UserPasswordForm::__construct()
- 10 core/modules/user/src/Form/UserPasswordForm.php \Drupal\user\Form\UserPasswordForm::__construct()
- 11.x 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\Core\TypedData\TypedDataManagerInterface $typed_data_manager: The typed data manager.
\Drupal\Component\Utility\EmailValidatorInterface $email_validator: The email validator service.
File
-
core/
modules/ user/ src/ Form/ UserPasswordForm.php, line 78
Class
- UserPasswordForm
- Provides a user password reset form.
Namespace
Drupal\user\FormCode
public function __construct(UserStorageInterface $user_storage, LanguageManagerInterface $language_manager, ConfigFactory $config_factory, FloodInterface $flood, TypedDataManagerInterface $typed_data_manager = NULL, EmailValidatorInterface $email_validator = NULL) {
$this->userStorage = $user_storage;
$this->languageManager = $language_manager;
$this->configFactory = $config_factory;
$this->flood = $flood;
if (is_null($typed_data_manager)) {
@trigger_error('Calling ' . __METHOD__ . ' without the $typed_data_manager argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3189310', E_USER_DEPRECATED);
$typed_data_manager = \Drupal::typedDataManager();
}
$this->typedDataManager = $typed_data_manager;
if (is_null($email_validator)) {
@trigger_error('Calling ' . __METHOD__ . ' without the $email_validator argument is deprecated in drupal:9.2.0 and will be required in drupal:10.0.0. See https://www.drupal.org/node/3189310', E_USER_DEPRECATED);
$email_validator = \Drupal::service('email.validator');
}
$this->emailValidator = $email_validator;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.