function menu_link_handler_sort_weight::options_form in Menu Link (Field) 7
Basic options for all sort criteria
Overrides views_handler_sort::options_form
File
- views/
menu_link_handler_sort_weight.inc, line 17
Class
- menu_link_handler_sort_weight
- Handler for menu weight field of menu_link module
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$level_vals = array();
for ($i = 1; $i < 10; $i++) {
$level_vals[$i] = $i;
}
$form['lowest'] = array(
'#type' => 'select',
'#options' => $level_vals,
'#default_value' => isset($this->options['lowest']) ? $this->options['lowest'] : 1,
'#title' => t('Start level'),
'#description' => t('This tells the sort handler from which value the sort will begin.'),
);
$form['highest'] = array(
'#type' => 'select',
'#options' => $level_vals,
'#default_value' => isset($this->options['highest']) ? $this->options['highest'] : 3,
'#title' => t('End level'),
'#description' => t('Set the deepest / highest level the sort will attempt to sort'),
);
}