public function CancelUserAction::__construct in Views Bulk Operations (VBO) 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/Action/CancelUserAction.php \Drupal\views_bulk_operations\Plugin\Action\CancelUserAction::__construct()
- 8 src/Plugin/Action/CancelUserAction.php \Drupal\views_bulk_operations\Plugin\Action\CancelUserAction::__construct()
- 4.0.x src/Plugin/Action/CancelUserAction.php \Drupal\views_bulk_operations\Plugin\Action\CancelUserAction::__construct()
Object constructor.
Parameters
array $configuration: Plugin configuration.
string $plugin_id: The plugin Id.
mixed $plugin_definition: Plugin definition.
Drupal\Core\Session\AccountInterface $currentUser: The current user.
\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory object.
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Module handler service.
Overrides PluginBase::__construct
File
- src/
Plugin/ Action/ CancelUserAction.php, line 62
Class
- CancelUserAction
- Cancels a user account.
Namespace
Drupal\views_bulk_operations\Plugin\ActionCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $currentUser, ConfigFactoryInterface $configFactory, ModuleHandlerInterface $moduleHandler) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->currentUser = $currentUser;
$this->userConfig = $configFactory
->get('user.settings');
$this->moduleHandler = $moduleHandler;
}