public function FieldFormatterFromViewDisplay::__construct in (Entity Reference) Field Formatters 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/FieldFormatterFromViewDisplay.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldFormatterFromViewDisplay::__construct()
- 8 src/Plugin/Field/FieldFormatter/FieldFormatterFromViewDisplay.php \Drupal\field_formatter\Plugin\Field\FieldFormatter\FieldFormatterFromViewDisplay::__construct()
Constructs a FieldFormatterFromViewDisplay 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: 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.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
Overrides FieldFormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ FieldFormatterFromViewDisplay.php, line 64
Class
- FieldFormatterFromViewDisplay
- Plugin implementation of the 'link' formatter.
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, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings, $language_manager, $entity_type_bundle_info, $entity_field_manager);
$this->entityTypeManager = $entity_type_manager;
$this->entityDisplayRepository = $entity_display_repository;
}