You are here

public function ColorboxFieldFormatter::__construct in Colorbox field formatter 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldFormatter/ColorboxFieldFormatter.php \Drupal\colorbox_field_formatter\Plugin\Field\FieldFormatter\ColorboxFieldFormatter::__construct()

ColorboxFieldFormatter constructor.

Parameters

$plugin_id:

$plugin_definition:

\Drupal\Core\Field\FieldDefinitionInterface $field_definition:

array $settings:

$label:

$view_mode:

array $third_party_settings:

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler:

\Drupal\colorbox\ColorboxAttachment $colorbox_attachment:

\Drupal\Core\Utility\Token $token:

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/ColorboxFieldFormatter.php, line 63

Class

ColorboxFieldFormatter
Plugin implementation of the 'colorbox_field_formatter' formatter.

Namespace

Drupal\colorbox_field_formatter\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, ModuleHandlerInterface $module_handler, ColorboxAttachment $colorbox_attachment, Token $token) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->moduleHandler = $module_handler;
  $this->colorboxAttachment = $colorbox_attachment;
  $this->token = $token;
}