public function FieldFormatterBase::__construct in (Entity Reference) Field Formatters 3.x
Constructs a FieldFormatterBase 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\Language\LanguageManagerInterface $language_manager: The language manager object for retrieving the correct language code.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
Overrides FormatterBase::__construct
2 calls to FieldFormatterBase::__construct()
- FieldFormatterFromViewDisplay::__construct in src/
Plugin/ Field/ FieldFormatter/ FieldFormatterFromViewDisplay.php - Constructs a FieldFormatterFromViewDisplay object.
- FieldFormatterWithInlineSettings::__construct in src/
Plugin/ Field/ FieldFormatter/ FieldFormatterWithInlineSettings.php - Constructs a FieldFormatterWithInlineSettings object.
2 methods override FieldFormatterBase::__construct()
- FieldFormatterFromViewDisplay::__construct in src/
Plugin/ Field/ FieldFormatter/ FieldFormatterFromViewDisplay.php - Constructs a FieldFormatterFromViewDisplay object.
- FieldFormatterWithInlineSettings::__construct in src/
Plugin/ Field/ FieldFormatter/ FieldFormatterWithInlineSettings.php - Constructs a FieldFormatterWithInlineSettings object.
File
- src/
Plugin/ Field/ FieldFormatter/ FieldFormatterBase.php, line 79
Class
- FieldFormatterBase
- Base class for field formatters.
Namespace
Drupal\field_formatter\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, LanguageManagerInterface $language_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, EntityFieldManagerInterface $entity_field_manager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->languageManager = $language_manager;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
$this->entityFieldManager = $entity_field_manager;
}