You are here

function location_invoke_locationapi in Location 7.5

Same name and namespace in other branches
  1. 5.3 location.module \location_invoke_locationapi()
  2. 5 location.module \location_invoke_locationapi()
  3. 6.3 location.module \location_invoke_locationapi()
  4. 7.3 location.module \location_invoke_locationapi()
  5. 7.4 location.module \location_invoke_locationapi()

Invoke a hook_locationapi() operation on all modules.

Parameters

&$location A location object.:

$op A string containing the name of the locationapi operation.:

$a3, $a4, $a5 Arguments to pass on to the hook.:

Return value

The returned value of the invoked hooks.

13 calls to location_invoke_locationapi()
LocationTestCase::getLocationFieldDefaults in tests/location_testcase.php
Get a set of location field defaults. This will also enable collection on all parts of the location field.
location_calc_difference in ./location.module
Computes the differences between two locations.
location_element_validate in ./location.module
Perform validation against a location fieldset.
location_empty_location in ./location.module
Returns an empty location object based on the given settings.
location_field_names in ./location.module

... See full list

File

./location.module, line 1158
Location module main routines. An implementation of a universal API for location manipulation. Provides functions for postal_code proximity searching, deep-linking into online mapping services. Currently, some options are configured through an…

Code

function location_invoke_locationapi(&$location, $op, $a3 = NULL, $a4 = NULL, $a5 = NULL) {
  $return = array();
  foreach (module_implements('locationapi') as $name) {
    $function = $name . '_locationapi';
    $result = $function($location, $op, $a3, $a4, $a5);
    if (isset($result) && is_array($result)) {
      $return = array_merge($return, $result);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}