You are here

public function TwitterButtonFormatter::__construct in Twitter Embed 8

Constructs a TwitterButtonFormatter.

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/TwitterButtonFormatter.php, line 24

Class

TwitterButtonFormatter
Plugin implementation of the 'twitter_button_formatter' formatter.

Namespace

Drupal\twitter_embed\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings) {

  // @todo dependency injection
  $this->twitterWidget = \Drupal::service('twitter_embed.button_widget');
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
}