You are here

public function ZoneDefaultFormatter::__construct in Address 8

Constructs a ZoneDefaultFormatter object.

Parameters

string $plugin_id: The plugin_id for the formatter.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.

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.

\CommerceGuys\Addressing\AddressFormat\AddressFormatRepositoryInterface $address_format_repository: The address format repository.

\CommerceGuys\Addressing\Country\CountryRepositoryInterface $country_repository: The country repository.

\CommerceGuys\Addressing\Subdivision\SubdivisionRepositoryInterface $subdivision_repository: The subdivision repository.

Overrides FormatterBase::__construct

File

src/Plugin/Field/FieldFormatter/ZoneDefaultFormatter.php, line 76

Class

ZoneDefaultFormatter
Plugin implementation of the 'address_zone_default' formatter.

Namespace

Drupal\address\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AddressFormatRepositoryInterface $address_format_repository, CountryRepositoryInterface $country_repository, SubdivisionRepositoryInterface $subdivision_repository) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->addressFormatRepository = $address_format_repository;
  $this->countryRepository = $country_repository;
  $this->subdivisionRepository = $subdivision_repository;
}