public function ContryFormatter::__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.
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 $entityTypeManager: Entity type manager service.
Overrides FormatterBase::__construct
File
- src/
Plugin/ Field/ FieldFormatter/ ContryFormatter.php, line 55
Class
- ContryFormatter
- Plugin implementation of the 'country_formatter' formatter.
Namespace
Drupal\country_state_city\Plugin\Field\FieldFormatterCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, EntityTypeManagerInterface $entityTypeManager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
$this->entityTypeManager = $entityTypeManager;
}