public function Country::__construct in Address 8
Same name in this branch
- 8 src/Plugin/views/sort/Country.php \Drupal\address\Plugin\views\sort\Country::__construct()
- 8 src/Plugin/views/field/Country.php \Drupal\address\Plugin\views\field\Country::__construct()
Constructs a Country object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The id of the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\CommerceGuys\Addressing\Country\CountryRepositoryInterface $country_repository: The country repository.
Overrides HandlerBase::__construct
File
- src/
Plugin/ views/ field/ Country.php, line 39
Class
- Country
- Allows the country name to be displayed instead of the country code.
Namespace
Drupal\address\Plugin\views\fieldCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, CountryRepositoryInterface $country_repository) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->countryRepository = $country_repository;
}