function views_handler_filter::init

cis7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)
cle7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)
elmsmedia7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)
icor7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)
meedjum_blog7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)
mooc7 views_handler_filter.inc views_handler_filter::init(&$view, &$options)

Provide some extra help to get the operator/value easier to use.

This likely has to be overridden by filters which are more complex than simple operator/value.

Overrides views_handler::init

3 methods override views_handler_filter::init()
date_views_filter_handler_simple::init in sites/all/modules/ulmus/date/date_views/includes/date_views_filter_handler_simple.inc
Provide some extra help to get the operator/value easier to use.
views_handler_filter_entity_bundle::init in sites/all/modules/ulmus/views/handlers/views_handler_filter_entity_bundle.inc
Provide some extra help to get the operator/value easier to use.
views_handler_filter_many_to_one::init in sites/all/modules/ulmus/views/handlers/views_handler_filter_many_to_one.inc
Provide some extra help to get the operator/value easier to use.

File

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

Class

views_handler_filter
Base class for filters.

Code

function init(&$view, &$options) {
  parent::init($view, $options);

  $this->operator = $this->options['operator'];
  $this->value = $this->options['value'];
  $this->group_info = $this->options['group_info']['default_group'];

  // Compatibility: The new UI changed several settings.
  if (!empty($options['exposed']) && !empty($options['expose']['optional']) && !isset($options['expose']['required'])) {
    $this->options['expose']['required'] = !$options['expose']['optional'];
  }
  if (!empty($options['exposed']) && !empty($options['expose']['single']) && !isset($options['expose']['multiple'])) {
    $this->options['expose']['multiple'] = !$options['expose']['single'];
  }
  if (!empty($options['exposed']) && !empty($options['expose']['operator']) && !isset($options['expose']['operator_id'])) {
    $this->options['expose']['operator_id'] = $options['expose']['operator_id'] = $options['expose']['operator'];
  }

  if ($this->multiple_exposed_input()) {
    $this->group_info = array_filter($options['group_info']['default_group_multiple']);
    $this->options['expose']['multiple'] = TRUE;
  }

  // If there are relationships in the view, allow empty should be true
  // so that we can do IS NULL checks on items. Not all filters respect
  // allow empty, but string and numeric do and that covers enough.
  if ($this->view->display_handler->get_option('relationships')) {
    $this->definition['allow empty'] = TRUE;
  }
}
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.