You are here

public function FormatterBase::__construct in Reference Table Formatter 8

Constructs a new ReferenceTableFormatter.

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.

EntityToTableRenderer $reference_renderer: The entity-to-table renderer.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The Entity type manager.

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository: The entity display repository.

Overrides FormatterBase::__construct

1 call to FormatterBase::__construct()
FieldCollection::__construct in src/Plugin/Field/FieldFormatter/FieldCollection.php
Constructs a new FieldCollection.
1 method overrides FormatterBase::__construct()
FieldCollection::__construct in src/Plugin/Field/FieldFormatter/FieldCollection.php
Constructs a new FieldCollection.

File

src/FormatterBase.php, line 182

Class

FormatterBase
A base field formatter class for rendering tables.

Namespace

Drupal\reference_table_formatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityToTableRenderer $reference_renderer, EntityTypeManagerInterface $entity_manager, EntityDisplayRepositoryInterface $display_repository) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->referenceRenderer = $reference_renderer;
  $this->entityManager = $entity_manager;
  $this->displayRepository = $display_repository;
}