function RegisterForm::__construct
Same name and namespace in other branches
- main core/modules/user/src/RegisterForm.php \Drupal\user\RegisterForm::__construct()
Constructs a new AccountForm object.
Parameters
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
Overrides AccountForm::__construct
File
-
core/
modules/ user/ src/ RegisterForm.php, line 29
Class
- RegisterForm
- Form handler for the user register forms.
Namespace
Drupal\userCode
public function __construct(EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, ?LoginFinalizer $loginFinalizer = NULL, ?NotificationHandler $notification_handler = NULL) {
parent::__construct($entity_repository, $language_manager, $entity_type_bundle_info, $time);
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;
if ($notification_handler === NULL) {
@trigger_error('Calling ' . __CLASS__ . ' constructor without the $notificationHandler argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3539363', E_USER_DEPRECATED);
}
$this->notificationHandler = $notification_handler ?? \Drupal::service(NotificationHandler::class);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.