You are here

geolocation.api.php in Geolocation Field 8.2

Same filename and directory in other branches
  1. 8.3 geolocation.api.php
  2. 8 geolocation.api.php

Hooks provided by the geolocation module.

File

geolocation.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the geolocation module.
 */

/**
 * Alter the map based widgets.
 *
 * @param array $element
 *   Element.
 * @param mixed $context
 *   Context.
 *
 * @code
 *   $context = [
 *     'widget' => \Drupal\geolocation\Plugin\Field\FieldWidget\GeolocationMapWidgetBase
 *     'form_state' => \Drupal\Core\Form\FormStateInterface $form_state
 *     'field_definition' => \Drupal\Core\Field\FieldDefinitionInterface $field_definition
 *   ];
 * @endcode
 *
 * @see \Drupal\geolocation\Plugin\Field\FieldWidget\GeolocationMapWidgetBase
 */
function hook_geolocation_field_map_widget_alter(array &$element, $context) {

  // Do something.
}

Functions

Namesort descending Description
hook_geolocation_field_map_widget_alter Alter the map based widgets.