You are here

function og_ui_handler_area_og_membership_overview::options_form in Organic groups 7.2

Default options form that provides the label widget that all fields should have.

Overrides views_handler_area::options_form

File

og_ui/includes/views/handlers/og_ui_handler_area_og_membership_overview.inc, line 26

Class

og_ui_handler_area_og_membership_overview
Overview of the group memberships (e.g. group manager, total memebrs).

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['manager'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show group manager'),
    '#default_value' => $this->options['manager'],
  );
  foreach (og_group_content_states() as $state => $label) {
    $form["total_members_{$state}"] = array(
      '#type' => 'checkbox',
      '#title' => t('Show total @label members', array(
        '@label' => strtolower($label),
      )),
      '#default_value' => $this->options["total_{$state}"],
    );
  }
  $form['total_members'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show total members'),
    '#default_value' => $this->options['total_members'],
  );
  $form['total_content'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show total content'),
    '#default_value' => $this->options['total_content'],
  );

  // Don't display a form element for the undefined empty option.
  unset($form['empty']);
}