You are here

public function ReadonlyFieldWidget::__construct in Read-only Field Widget 8

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 WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/ReadonlyFieldWidget.php, line 45

Class

ReadonlyFieldWidget
Plugin implementation of the 'readonly_field_widget' widget.

Namespace

Drupal\readonly_field_widget\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, $field_formatter_manager, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->fieldFormatterManager = $field_formatter_manager;
  $this->entityTypeManager = $entity_type_manager;
}