You are here

public function FieldLink::__construct in (Entity Reference) Field Formatters 3.x

Constructs a FieldLink 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.

array $settings: The formatter settings.

string $label: The formatter label display setting.

string $view_mode: The view mode.

array $third_party_settings: Any third party settings.

\Drupal\Core\Field\FormatterPluginManager $formatter_plugin_manager: The formatter plugin manager.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager object for retrieving the correct language code.

Overrides FieldWrapperBase::__construct

File

src/Plugin/Field/FieldFormatter/FieldLink.php, line 53

Class

FieldLink
Provides the field link formatter.

Namespace

Drupal\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, FormatterPluginManager $formatter_plugin_manager, LanguageManagerInterface $language_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $formatter_plugin_manager);
  $this->languageManager = $language_manager;
}