You are here

public static function WebformLocationGeocomplete::getLocationAttributes in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_location_geocomplete/src/Element/WebformLocationGeocomplete.php \Drupal\webform_location_geocomplete\Element\WebformLocationGeocomplete::getLocationAttributes()

Get location attributes.

Return value

array An associative array container location attribute name and titles.

Overrides WebformLocationBase::getLocationAttributes

File

modules/webform_location_geocomplete/src/Element/WebformLocationGeocomplete.php, line 32

Class

WebformLocationGeocomplete
Provides a webform element for a location geocomplete element.

Namespace

Drupal\webform_location_geocomplete\Element

Code

public static function getLocationAttributes() {
  return [
    'lat' => t('Latitude'),
    'lng' => t('Longitude'),
    'location' => t('Location'),
    'formatted_address' => t('Formatted Address'),
    'street_address' => t('Street Address'),
    'street_number' => t('Street Number'),
    'subpremise' => t('Unit'),
    'postal_code' => t('Postal Code'),
    'locality' => t('Locality'),
    'sublocality' => t('City'),
    'administrative_area_level_1' => t('State/Province'),
    'country' => t('Country'),
    'country_short' => t('Country Code'),
  ];
}