public function ConsentWidget::__construct in General Data Protection Regulation 3.0.x
Same name and namespace in other branches
- 8.2 modules/gdpr_consent/src/Plugin/Field/FieldWidget/ConsentWidget.php \Drupal\gdpr_consent\Plugin\Field\FieldWidget\ConsentWidget::__construct()
- 8 modules/gdpr_consent/src/Plugin/Field/FieldWidget/ConsentWidget.php \Drupal\gdpr_consent\Plugin\Field\FieldWidget\ConsentWidget::__construct()
Constructs a ConsentWidget instance.
Parameters
string $plugin_id: The plugin_id for the formatter.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.
array $settings: The formatter settings.
array $third_party_settings: Any third party settings settings.
\Drupal\gdpr_consent\ConsentUserResolver\ConsentUserResolverPluginManager $gdprConsentResolverManager: The GDPR Consent Resolver manager.
\Drupal\Core\Session\AccountInterface $currentUser: The current user.
Overrides WidgetBase::__construct
File
- modules/
gdpr_consent/ src/ Plugin/ Field/ FieldWidget/ ConsentWidget.php, line 83
Class
- ConsentWidget
- Plugin implementation of the 'gdpr_consent_widget' widget.
Namespace
Drupal\gdpr_consent\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ConsentUserResolverPluginManager $gdprConsentResolverManager, AccountInterface $currentUser) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->gdprConsentResolverManager = $gdprConsentResolverManager;
$this->currentUser = $currentUser;
}