You are here

public function VotingApiWidget::__construct in Votingapi Widgets 8

Constructs the VotingApiWidget object.

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\votingapi_widgets\Plugin\VotingApiWidgetManager $widget_manager: The votingapi_widget widget manager.

\Drupal\Core\Session\AccountInterface $account: The user account.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/VotingApiWidget.php, line 67

Class

VotingApiWidget
Plugin implementation of the 'voting_api_widget' widget.

Namespace

Drupal\votingapi_widgets\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, VotingApiWidgetManager $widget_manager, AccountInterface $account) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->account = $account;
  $this->votingapiWidgetProcessor = $widget_manager;
}