You are here

public function UserRegistrationResource::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php \Drupal\user\Plugin\rest\resource\UserRegistrationResource::__construct()

Constructs a new UserRegistrationResource instance.

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.

array $serializer_formats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Config\ImmutableConfig $user_settings: A user settings config instance.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides ResourceBase::__construct

File

core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php, line 67

Class

UserRegistrationResource
Represents user registration as a resource.

Namespace

Drupal\user\Plugin\rest\resource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, ImmutableConfig $user_settings, AccountInterface $current_user) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
  $this->userSettings = $user_settings;
  $this->currentUser = $current_user;
}