public function CountryStateWidget::__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/ CountryStateWidget.php, line 49
Class
- CountryStateWidget
- Plugin implementation of the 'country_state_widget' widget.
Namespace
Drupal\country_state_city\Plugin\Field\FieldWidgetCode
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;
}