You are here

public function AddressToGeo::__construct in Geolocation Address Link 8

Constructor.

File

src/AddressToGeo.php, line 81

Class

AddressToGeo
Class AddressToGeo.

Namespace

Drupal\geolocation_address_link

Code

public function __construct(GeolocationCore $geolocationManager, AddressFormatRepositoryInterface $address_format_repository, CountryRepositoryInterface $country_repository, SubdivisionRepositoryInterface $subdivision_repository) {
  $this->geolocationManager = $geolocationManager;
  $this->addressFormatRepository = $address_format_repository;
  $this->countryRepository = $country_repository;
  $this->subdivisionRepository = $subdivision_repository;

  // Set up the geocoder and address formatter.
  $this
    ->setGeocoder();
  $this
    ->setFormatCountry();
  $this
    ->setFormatLanguage();
  $this
    ->setFormatter();
}