You are here

public function CountryWidget::__construct in Country, State and City Fields 8

Construct a MyFormatter object.

Parameters

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: Defines an interface for entity field definitions.

array $settings: The formatter settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager service.

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/CountryWidget.php, line 49

Class

CountryWidget
Plugin implementation of the 'country_widget' widget.

Namespace

Drupal\country_state_city\Plugin\Field\FieldWidget

Code

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