public function SocialAddRoleUser::__construct in Open Social 8.9
Same name and namespace in other branches
- 8.7 modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
- 8.8 modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
- 10.3.x modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
- 10.0.x modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
- 10.1.x modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
- 10.2.x modules/social_features/social_user/src/Plugin/Action/SocialAddRoleUser.php \Drupal\social_user\Plugin\Action\SocialAddRoleUser::__construct()
Constructs a \Drupal\Component\Plugin\PluginBase 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.
Overrides ChangeUserRoleBase::__construct
File
- modules/
social_features/ social_user/ src/ Plugin/ Action/ SocialAddRoleUser.php, line 42
Class
- SocialAddRoleUser
- Adds a role to a user but restricted by role.
Namespace
Drupal\social_user\Plugin\ActionCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeInterface $entity_type, AccountProxyInterface $currentUser, DelegatableRolesInterface $delegatableRoles) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type);
$this->entityType = $entity_type;
$this->currentUser = $currentUser
->getAccount();
$this->delegatableRoles = $delegatableRoles;
}