You are here

public function ContryStateCityFormatter::__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/ContryStateCityFormatter.php, line 55

Class

ContryStateCityFormatter
Plugin implementation of the 'contry_state_city_formatter' formatter.

Namespace

Drupal\country_state_city\Plugin\Field\FieldFormatter

Code

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;
}