You are here

GoogleMapsBusiness.php in Geocoder 8.3

Same filename and directory in other branches
  1. 8.2 src/Plugin/Geocoder/Provider/GoogleMapsBusiness.php

File

src/Plugin/Geocoder/Provider/GoogleMapsBusiness.php
View source
<?php

namespace Drupal\geocoder\Plugin\Geocoder\Provider;

use Drupal\geocoder\ConfigurableProviderUsingHandlerWithAdapterBase;
use Geocoder\Provider\GoogleMaps\GoogleMaps;

/**
 * Geocoder provider plugin for Google Maps for Business.
 *
 * @GeocoderProvider(
 *   id = "googlemaps_business",
 *   name = "GoogleMapsBusiness",
 *   handler = "\Geocoder\Provider\GoogleMaps\GoogleMaps",
 *   arguments = {
 *     "clientId" = "",
 *     "privateKey" = "",
 *     "region" = "",
 *     "apiKey" = "",
 *     "channel" = ""
 *   }
 * )
 */
class GoogleMapsBusiness extends ConfigurableProviderUsingHandlerWithAdapterBase {

  /**
   * {@inheritdoc}
   */
  protected function getHandler() {
    if ($this->handler === NULL) {
      $this->handler = GoogleMaps::business($this->httpAdapter, $this->configuration['clientId'], $this->configuration['privateKey'], $this->configuration['region'], $this->configuration['apiKey'], $this->configuration['channel']);
    }
    return $this->handler;
  }

}

Classes

Namesort descending Description
GoogleMapsBusiness Geocoder provider plugin for Google Maps for Business.