You are here

function location_display in Location 7.3

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

Location display.

2 calls to location_display()
location_node_node_view in ./location_node.module
Implements hook_node_view().
location_user_user_view in ./location_user.module
Implements hook_user_view().

File

./location.module, line 2216
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_display($settings, $locations) {
  if (!isset($settings['display']['hide'])) {

    // We weren't configured properly, bail.
    return array();
  }
  $hide = array_keys(array_filter($settings['display']['hide']));

  // Show all locations.
  return array(
    '#type' => 'markup',
    '#theme' => 'locations',
    '#locations' => $locations,
    '#hide' => $hide,
    '#weight' => $settings['display']['weight'],
  );
}