You are here

function _weight_get_options in Weight 7.3

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

Get weight range options.

2 calls to _weight_get_options()
views_handler_weight_selector::views_form in views/views_handler_weight_selector.inc
weight_field_widget_form in ./weight.module
Implements hook_field_widget_form().

File

./weight.module, line 173
Provides a weight field that allows entities to be ordered.

Code

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