You are here

public function VotingApiReactionWidget::__construct in Voting API Reaction 8

Class constructor.

Parameters

string $plugin_id: The plugin_id for the widget.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Session\AccountProxy $currentUser: Current user service.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/VotingApiReactionWidget.php, line 51

Class

VotingApiReactionWidget
Plugin implementation of the 'votingapi_reaction_default' widget.

Namespace

Drupal\votingapi_reaction\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, AccountProxy $currentUser) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->currentUser = $currentUser;
}