function views_tree_plugin_style_tree::options_form in Views tree 6.2
Same name and namespace in other branches
- 6 views_tree_plugin_style_tree.inc \views_tree_plugin_style_tree::options_form()
- 7.2 views_tree_plugin_style_tree.inc \views_tree_plugin_style_tree::options_form()
Render the given style.
File
- ./
views_tree_plugin_style_tree.inc, line 30 - Contains the list style plugin.
Class
- views_tree_plugin_style_tree
- Style plugin to render each item in a slideshow of an ordered or unordered list.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
watchdog(WATCHDOG_DEBUG, __FILE . ': ' . __LINE__);
$fields = array(
'' => t('<None>'),
);
foreach ($this->display->handler
->get_handlers('field') as $field => $handler) {
if ($label = $handler
->label()) {
$fields[$field] = $label;
}
else {
$fields[$field] = $handler
->ui_name();
}
}
$events = array(
'click' => t('On Click'),
'mouseover' => t('On Mouseover'),
);
$form['type']['#description'] = t('Whether to use an ordered or unordered list for the retrieved items. Most use cases will prefer Unordered.');
$form['main_field'] = array(
'#type' => 'select',
'#title' => t('Main field'),
'#options' => $fields,
'#default_value' => $this->options['main_field'],
'#description' => t('Select the field with the unique identifier for each record.'),
'#required' => TRUE,
);
$form['parent_field'] = array(
'#type' => 'select',
'#title' => t('Parent field'),
'#options' => $fields,
'#default_value' => $this->options['parent_field'],
'#description' => t('Select the field that contains the unique identifier of the record\'s parent.'),
);
}