function views_plugin_style::options_form in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 plugins/views_plugin_style.inc \views_plugin_style::options_form()
- 7.3 plugins/views_plugin_style.inc \views_plugin_style::options_form()
Provide a form to edit options for this plugin.
Overrides views_plugin::options_form
7 calls to views_plugin_style::options_form()
- views_plugin_style_default::options_form in plugins/
views_plugin_style_default.inc - Provide a form to edit options for this plugin.
- views_plugin_style_grid::options_form in plugins/
views_plugin_style_grid.inc - Render the given style.
- views_plugin_style_jump_menu::options_form in plugins/
views_plugin_style_jump_menu.inc - Render the given style.
- views_plugin_style_list::options_form in plugins/
views_plugin_style_list.inc - Render the given style.
- views_plugin_style_rss::options_form in plugins/
views_plugin_style_rss.inc - Provide a form to edit options for this plugin.
8 methods override views_plugin_style::options_form()
- views_plugin_style_default::options_form in plugins/
views_plugin_style_default.inc - Provide a form to edit options for this plugin.
- views_plugin_style_grid::options_form in plugins/
views_plugin_style_grid.inc - Render the given style.
- views_plugin_style_jump_menu::options_form in plugins/
views_plugin_style_jump_menu.inc - Render the given style.
- views_plugin_style_list::options_form in plugins/
views_plugin_style_list.inc - Render the given style.
- views_plugin_style_rss::options_form in plugins/
views_plugin_style_rss.inc - Provide a form to edit options for this plugin.
File
- plugins/
views_plugin_style.inc, line 84
Class
- views_plugin_style
- Base class to define a style plugin handler.
Code
function options_form(&$form, &$form_state) {
// Only fields-based views can handle grouping. Style plugins can also exclude
// themselves from being groupable by setting their "use grouping" definiton
// key to FALSE.
// @TODO: Document "uses grouping" in docs.php when docs.php is written.
if ($this
->uses_fields() && $this->definition['uses grouping']) {
$options = array(
'' => t('- None -'),
);
$options += $this->display->handler
->get_field_labels();
// If there are no fields, we can't group on them.
if (count($options) > 1) {
$form['grouping'] = array(
'#type' => 'select',
'#title' => t('Grouping field'),
'#options' => $options,
'#default_value' => $this->options['grouping'],
'#description' => t('You may optionally specify a field by which to group the records. Leave blank to not group.'),
);
}
}
}