function UserMultipleCancelConfirm::__construct

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

File

core/modules/user/src/Form/UserMultipleCancelConfirm.php, line 55

Class

UserMultipleCancelConfirm
Provides a confirmation form for cancelling multiple user accounts.

Namespace

Drupal\user\Form

Code

public function __construct(PrivateTempStoreFactory $temp_store_factory, UserStorageInterface $user_storage, EntityTypeManagerInterface $entity_type_manager, protected ?AccountCancellation $accountCancellation = NULL) {
  $this->tempStoreFactory = $temp_store_factory;
  $this->userStorage = $user_storage;
  $this->entityTypeManager = $entity_type_manager;
  if ($accountCancellation === NULL) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $accountCancellation argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3620934', E_USER_DEPRECATED);
    $accountCancellation = \Drupal::service(AccountCancellation::class);
  }
  $this->accountCancellation = $accountCancellation;
}

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