You are here

public function ProductAttributesOverview::__construct in Commerce Core 8.2

Constructs a new ProductAttributesOverview 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\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

\Drupal\commerce_product\ProductAttributeFieldManagerInterface $attribute_field_manager: The attribute field manager.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

Overrides FormatterBase::__construct

File

modules/product/src/Plugin/Field/FieldFormatter/ProductAttributesOverview.php, line 86

Class

ProductAttributesOverview
Plugin implementation of the 'commerce_product_attributes_overview' formatter.

Namespace

Drupal\commerce_product\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, EntityDisplayRepositoryInterface $entity_display_repository, ProductAttributeFieldManagerInterface $attribute_field_manager, RendererInterface $renderer) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->entityTypeManager = $entity_type_manager;
  $this->entityDisplayRepository = $entity_display_repository;
  $this->attributeFieldManager = $attribute_field_manager;
  $this->renderer = $renderer;
}