You are here

function _weight_get_options in Weight 7.2

Same name and namespace in other branches
  1. 7.3 weight.module \_weight_get_options()

Get an array of options to for selecting a weight.

4 calls to _weight_get_options()
weight_field_attach_form in ./weight.module
Implements hook_field_attach_form().
weight_form_node_admin_content_alter in ./weight.module
Implements hook_form_FORM_ID_alter().
weight_form_node_type_form_alter in ./weight.module
Implements hook_form_FORM_ID_alter().
weight_handler_field_weight::views_form in views/weight_handler_field_weight.inc

File

./weight.module, line 788

Code

function _weight_get_options($range) {
  $max = $range;
  $min = $max * -1;
  $options = array();
  for ($i = $min; $i <= $max; $i++) {
    $options[$i] = $i;
  }
  return $options;
}