You are here

function getlocations_element_map_limits in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_element_map_limits()

Function

Return value

Returns form element

2 calls to getlocations_element_map_limits()
getlocations_search_form in modules/getlocations_search/getlocations_search.module
The search form
_getlocations_search_settings_form in modules/getlocations_search/getlocations_search.admin.inc

File

./getlocations.module, line 3666
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_element_map_limits($default, $title = '', $description = '') {
  if (empty($title)) {
    $title = t('Locations to show');
  }
  if (empty($description)) {
    $description = t('The maximum number of locations to show, sorted by distance');
  }
  $element = array(
    '#type' => 'select',
    '#title' => $title,
    '#description' => $description,
    '#options' => array(
      0 => t('All'),
      10 => '10',
      20 => '20',
      30 => '30',
      40 => '40',
      50 => '50',
      75 => '75',
      100 => '100',
      150 => '150',
      175 => '175',
      200 => '200',
      250 => '250',
      300 => '300',
      400 => '400',
      500 => '500',
    ),
    '#default_value' => $default,
  );
  return $element;
}