function UserLoginForm::__construct

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

File

core/modules/user/src/Form/UserLoginForm.php, line 81

Class

UserLoginForm
Provides a user login form.

Namespace

Drupal\user\Form

Code

public function __construct(UserFloodControlInterface $user_flood_control, UserStorageInterface $user_storage, UserAuthInterface|UserAuthenticationInterface $user_auth, RendererInterface $renderer, BareHtmlPageRendererInterface $bare_html_renderer, ?LoginFinalizer $loginFinalizer = NULL) {
  $this->userFloodControl = $user_flood_control;
  $this->userStorage = $user_storage;
  if (!$user_auth instanceof UserAuthenticationInterface) {
    @trigger_error('The $user_auth parameter not implementing UserAuthenticationInterface is deprecated in drupal:10.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3411040');
  }
  $this->userAuth = $user_auth;
  $this->renderer = $renderer;
  $this->bareHtmlPageRenderer = $bare_html_renderer;
  if ($loginFinalizer === NULL) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $loginFinalizer argument is deprecated in drupal:11.5.0 and it will be required from drupal:12.0.0. See https://www.drupal.org/node/3379194', E_USER_DEPRECATED);
    $loginFinalizer = \Drupal::service(LoginFinalizer::class);
  }
  $this->loginFinalizer = $loginFinalizer;
}

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