function CancelUser::__construct

Same name and namespace in other branches
  1. 8.9.x core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::__construct()
  2. 10 core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::__construct()
  3. 11.x core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::__construct()

Constructs a CancelUser object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory: The tempstore factory.

\Drupal\Core\Session\AccountInterface $current_user: Current user.

File

core/modules/user/src/Plugin/Action/CancelUser.php, line 51

Class

CancelUser
Cancels a user account.

Namespace

Drupal\user\Plugin\Action

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) {
    $this->currentUser = $current_user;
    $this->tempStoreFactory = $temp_store_factory;
    parent::__construct($configuration, $plugin_id, $plugin_definition);
}

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