Same name and namespace in other branches
  1. 8.x-2.x src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php \Drupal\color_field\Plugin\Field\FieldFormatter\ColorFieldFormatterCss::__construct() 1 comment

Constructs an ColorFieldFormatterCss object.

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.

mixed[] $settings: The formatter settings.

string $label: The formatter label display setting.

string $view_mode: The view mode.

mixed[] $third_party_settings: Any third party settings.

\Drupal\Core\Utility\Token $token_service: The token service.

\Drupal\token\TokenEntityMapperInterface|null $token_entity_mapper: Optional token entity mapper service.

File

src/Plugin/Field/FieldFormatter/ColorFieldFormatterCss.php, line 67

Class

ColorFieldFormatterCss
Plugin implementation of the color_field css declaration formatter.

Namespace

Drupal\color_field\Plugin\Field\FieldFormatter

Code

public function __construct(string $plugin_id, mixed $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, string $label, string $view_mode, array $third_party_settings, Token $token_service, ?TokenEntityMapperInterface $token_entity_mapper = NULL) {
    parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
    $this->tokenService = $token_service;
    $this->tokenEntityMapper = $token_entity_mapper;
}