You are here

public function SvgImageFieldWidget::__construct in SVG Image Field 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/Field/FieldWidget/SvgImageFieldWidget.php \Drupal\svg_image_field\Plugin\Field\FieldWidget\SvgImageFieldWidget::__construct()
  2. 2.0.x src/Plugin/Field/FieldWidget/SvgImageFieldWidget.php \Drupal\svg_image_field\Plugin\Field\FieldWidget\SvgImageFieldWidget::__construct()

Constructs a WidgetBase object.

Parameters

string $plugin_id: The plugin_id for the widget.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

Overrides FileWidget::__construct

File

src/Plugin/Field/FieldWidget/SvgImageFieldWidget.php, line 46

Class

SvgImageFieldWidget
Plugin implementation of the 'image_image' widget.

Namespace

Drupal\svg_image_field\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ElementInfoManagerInterface $element_info, Renderer $renderer, EntityRepositoryInterface $entity_repository) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $element_info);
  $this->renderer = $renderer;
  $this->entityRepository = $entity_repository;
}