function views_handler_filter::group_form

cis7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)
cle7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)
elmsmedia7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)
icor7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)
meedjum_blog7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)
mooc7 views_handler_filter.inc views_handler_filter::group_form(&$form, &$form_state)

Build a form containing a group of operator | values to apply as a single filter.

File

sites/all/modules/ulmus/views/handlers/views_handler_filter.inc, line 701
@todo.

Class

views_handler_filter
Base class for filters.

Code

function group_form(&$form, &$form_state) {
  if (!empty($this->options['group_info']['optional']) && !$this->multiple_exposed_input()) {

    $old_any = $this->options['group_info']['widget'] == 'select' ? '<Any>' : '&lt;Any&gt;';
    $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? $old_any : t('- Any -');
    $groups = array('All' => $any_label);
  }
  foreach ($this->options['group_info']['group_items'] as $id => $group) {
    if (!empty($group['title'])) {
      $groups[$id] = $id != 'All' ? t($group['title']) : $group['title'];
    }
  }

  if (count($groups)) {
    $value = $this->options['group_info']['identifier'];

    $form[$value] = array(
      '#type' => $this->options['group_info']['widget'],
      '#default_value' => $this->group_info,
      '#options' => $groups,
    );
    if (!empty($this->options['group_info']['multiple'])) {
      if (count($groups) < 5) {
        $form[$value]['#type'] = 'checkboxes';
      }
      else {
        $form[$value]['#type'] = 'select';
        $form[$value]['#size'] = 5;
        $form[$value]['#multiple'] = TRUE;
      }
      unset($form[$value]['#default_value']);
      if (empty($form_state['input'])) {
        $form_state['input'][$value] = $this->group_info;
      }
    }

    $this->options['expose']['label'] = '';
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.