You are here

class ds_handler_field_fieldgroup in Display Suite 6

Same name and namespace in other branches
  1. 6.3 views/ds_handler_field_fieldgroup.inc \ds_handler_field_fieldgroup
  2. 6.2 views/ds_handler_field_fieldgroup.inc \ds_handler_field_fieldgroup

Field handler to create a fieldgroup.

Hierarchy

Expanded class hierarchy of ds_handler_field_fieldgroup

2 string references to 'ds_handler_field_fieldgroup'
ds_views_data in views/ds.views.inc
Implementation of hook_views_data().
views_plugin_ds_fields_view::options_form in views/views_plugin_ds_fields_view.inc
Provide a form for setting options.

File

views/ds_handler_field_fieldgroup.inc, line 11
Contains the display suite fieldgroup handler.

View source
class ds_handler_field_fieldgroup extends views_handler_field {
  function query() {

    // do nothing -- to override the parent query.
  }
  function option_definition() {
    $options = parent::option_definition();
    $options['ds_format'] = array(
      'default' => 'ds_field',
    );
    return $options;
  }
  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $options = array(
      'ds_field' => 'A simple div',
      'ds_group_fieldset_open' => 'Fieldset open',
      'ds_group_fieldset_collapsible' => 'Fieldset collapsible',
      'ds_group_fieldset_collapsed' => 'Fieldset collapsed',
    );
    if (module_exists('tabs')) {
      $options['tabs'] = 'Tabs';
    }
    $form['ds_format'] = array(
      '#type' => 'select',
      '#title' => t('Format'),
      '#default_value' => $this->options['ds_format'],
      '#options' => $options,
    );

    // Remove all the rest that's normall associated with fields.
    unset($form['alter']);
    unset($form['exclude']);
    unset($form['empty']);
    unset($form['empty_zero']);
    unset($form['hide_empty']);
  }
  function render($values) {
    return;
  }

}

Members