class views_handler_filter_selective in Views Selective Filters 7
Views filter handler for selective values.
Hierarchy
- class \views_object
- class \views_handler
- class \views_handler_filter
- class \views_handler
Expanded class hierarchy of views_handler_filter_selective
1 string reference to 'views_handler_filter_selective'
File
- ./
views_handler_filter_selective.inc, line 11 - Views Filter Selective Handler Overrides.
View source
class views_handler_filter_selective extends views_handler_filter_in_operator {
/**
* The original filter value options, if it's an options list handler.
*
* @var array|false
*/
protected $originalOptions;
/**
* Static results set.
*
* @var array
*/
protected static $results;
/**
* {@inheritdoc}
*/
public function set_default_options() {
parent::set_default_options();
// This filter should always be exposed!
$this->options['exposed'] = TRUE;
// Do not allow to reduce options, makes no sense.
$this->options['expose']['reduce'] = FALSE;
}
/**
* {@inheritdoc}
*/
public function get_value_options() {
$this->value_options = array();
// If $this->view->selective_oids means that the handler is
// being called inside the cloned view used to obtain
// the selective values and thus this is to prevent infinite
// recursive loop.
if (empty($this->view->selective_oids) && !empty($this->view->inited)) {
$oids = $this
->get_oids();
$this->value_options = $oids;
// TODO: Omit null values in result: they are improperly handled.
// When constructing the query.
$this->value_options = array_diff_key($this->value_options, array(
"" => NULL,
));
// Set a flag in the view so we know it is using selective filters.
$this->view->using_selective = TRUE;
}
else {
if (!empty($this->view->selective_oids)) {
$this->value_options = array();
}
else {
// This is a special case, if $this->value_options is not an array
// then parent::value_form() will throw an exception, so,
// in our custom override no form is generated when $this->value_options
// is not an array. We only want this to happen in the administrative
// interface.
unset($this->value_options);
}
}
}
/**
* {@inheritdoc}
*/
public function value_form(&$form, &$form_state) {
$this
->get_value_options();
// If you call parent::value_form() and $this->value_options
// is not an array, an exception is thrown.
if (isset($this->value_options) && is_array($this->value_options)) {
parent::value_form($form, $form_state);
}
// Avoid the 'illegal values' Form API error.
$form['value']['#validated'] = TRUE;
// Add behaviour for ajax block refresh.
// Don't do this if the view is being executed
// to obtain selective values.
if (empty($this->view->selective_oids)) {
$form['#attached']['js'][] = drupal_get_path('module', 'views_filters_selective') . '/js/attachBehaviours.js';
}
}
/**
* Tell if two base fields are compatible.
*/
protected function baseFieldCompatible($base_field1, $base_field2) {
// Extended condition see https://www.drupal.org/node/2295707
return preg_match('/^' . $base_field1 . '/', $base_field2);
}
/**
* {@inheritdoc}
*/
public function options_form(&$form, &$form_state) {
$base_field = $this->definition['field_base'];
parent::options_form($form, $form_state);
// Filter should always be exposed, show warning.
array_unshift($form['expose_button'], array(
'warning' => array(
'#type' => 'markup',
'#markup' => '<div class="messages warning">' . t('This filter is always exposed to users.') . '</div>',
),
));
// Remove option to unexpose filter. Tried to disable, but did not work.
$form['expose_button']['checkbox']['checkbox']['#type'] = 'hidden';
unset($form['expose_button']['button']);
unset($form['expose_button']['markup']);
// Do not allow to check "all values".
$form['value']['#attributes']['disabled'] = 'disabled';
// Cannot group without values.
unset($form['group_button']);
// Preload handlers, sorts and filters.
// This gest cached all along.
$this->view->display_handler
->get_handlers('field');
$this->view->display_handler
->get_handlers('sort');
$this->view->display_handler
->get_handlers('filter');
// Add combo to pick display field for filter.
$options = array();
foreach ($this->view->display_handler->handlers['field'] as $key => $handler) {
if ($this
->baseFieldCompatible($base_field, $handler->field)) {
$options[$handler->options['id']] = $handler->definition['group'] . ': ' . $handler->definition['title'] . '(' . $handler
->label() . ')';
}
}
$form['selective_display_field'] = array(
'#title' => t('Display field'),
'#type' => 'select',
'#description' => t('Field to be used for the selective options.'),
'#options' => $options,
'#default_value' => $this->options['selective_display_field'],
);
// Add combo to pick sort for display.
$options = array();
$options['NONE'] = t('No sorting');
// Add option for custom sortings.
if ($this
->getOriginalOptions()) {
$options['ORIG'] = t('As the original filter');
}
$options['KASC'] = t('Custom key ascending (ksort)');
$options['KDESC'] = t('Custom key descending (ksort reverse)');
$options['ASC'] = t('Custom ascending (asort)');
$options['DESC'] = t('Custom descending (asort reverse)');
// TODO: Allow the use of view's sorts!
//foreach ($this->view->display_handler->handlers['sort'] as $key => $handler) {
// $options[$handler->options['id']] = $handler->definition['group'] . ': ' . $handler->definition['title'];
//}
$form['selective_display_sort'] = array(
'#title' => t('Sort field'),
'#type' => 'select',
'#description' => t('Choose wich field to use for display'),
'#options' => $options,
'#default_value' => $this->options['selective_display_sort'],
);
$form['selective_items_limit'] = array(
'#title' => t('Limit number of select items'),
'#type' => 'textfield',
'#description' => t("Don't allow a badly configured selective filter to return thousands of possible values. Enter a limit or remove any value for no limit. We recommend to set a limit no higher than 100."),
'#default_value' => $this->options['selective_items_limit'],
'#size' => 10,
'#element_validate' => array(
'element_validate_integer_positive',
),
);
$form['selective_options_ignore_exposed_data'] = array(
'#title' => t('Always show default set of options, even after exposed filters have been applied'),
'#type' => 'checkbox',
'#description' => t("If you don't want the filter options to continue to be filtered as additional exposed filters are applied, check this box"),
'#default_value' => $this->options['selective_options_ignore_exposed_data'],
);
}
/**
* {@inheritdoc}
*/
public function expose_form(&$form, &$form_state) {
parent::expose_form($form, $form_state);
// Remove reduce resultset interface.
unset($form['expose']['reduce']);
// TODO: Populated somewhere through AJAX, I could not find it....
// Provide default value for filter name.
if (empty($form['expose']['identifier']['#default_value'])) {
$form['expose']['identifier']['#default_value'] = $this->options['field'];
}
if (empty($form['expose']['label']['#default_value'])) {
$form['expose']['label']['#default_value'] = $this->definition['title'];
}
if (empty($form['ui_name']['#default_value'])) {
$form['ui_name']['#default_value'] = $this->definition['title'];
}
}
/**
* {@inheritdoc}
*/
public function query() {
// If this view was constructed to obtain the selective values for this
// handler, the handler should not add any constraints itself.
if (isset($this->view->selective_handler_signature) && $this
->getSignature() == $this->view->selective_handler_signature) {
return;
}
// Decode the values to restore special chars.
if (is_array($this->value)) {
$this->value = array_map('urldecode', $this->value);
}
elseif (is_string($this->value)) {
$this->value = urldecode($this->value);
}
parent::query();
}
/**
* {@inheritdoc}
*/
public function option_definition() {
$options = parent::option_definition();
// Storage for field used to display values.
$options['selective_display_field']['default'] = '';
// Storage for sort used to sort display values.
$options['selective_display_sort']['default'] = 'ASC';
// Storage for aggregated fields.
$options['selective_aggregated_fields']['default'] = '';
// Limit aggregated items to prevent a huge number of options in select.
$options['selective_items_limit']['default'] = 100;
// Toggle to not continue to filter options after exposed filters are
// applied.
$options['selective_options_ignore_exposed_data']['default'] = 0;
return $options;
}
/**
* Get a signature for current filter handler.
*/
protected function getSignature() {
$signature = md5(serialize(array(
'name' => $this->view->name,
'args' => $this->view->args,
'input' => $this->view->exposed_input,
'base_field' => $this->definition['field_base'],
'real_field' => $this->real_field,
'field' => $this->field,
'table' => $this->table,
'ui_name' => $this->options['ui_name'],
)));
return $signature;
}
/**
* Get list of options for current view, only at runtime.
*/
protected function get_oids() {
// Parameters that we will be using during the process.
$base_field = $this->definition['field_base'];
$ui_name = $this->options['ui_name'];
$signature = $this
->getSignature();
// Prevent same filters from being recalculated.
if (empty(self::$results[$signature])) {
// We don't want a badly configured selective filter
// to return thousands of possible values.
$max_items = (int) $this->options['selective_items_limit'];
// Clone the view (so it works while editting) and get all results.
$view_copy = $this->view
->clone_view();
if (!$view_copy) {
return NULL;
}
// Store a flag so that we can know from other places
// that this view is being used to obtain selective data.
$view_copy->selective_oids = TRUE;
// Store information about what filter is this view being used for.
$view_copy->selective_handler_signature = $signature;
// If this filter is configured to *not* continue to filter the options
// list as new exposed values are applied, make sure to explicitly set any
// exposed input values to null and remove contextual filters (args).
if (isset($this->options['selective_options_ignore_exposed_data']) && $this->options['selective_options_ignore_exposed_data'] === 1) {
if (!empty($this->view->exposed_input) && is_array($this->view->exposed_input)) {
$new_exposed_input = array();
foreach ($this->view->exposed_input as $key => $val) {
$new_exposed_input[$key] = NULL;
}
$view_copy
->set_exposed_input($new_exposed_input);
}
}
else {
$view_copy
->set_exposed_input($this->view->exposed_input);
}
// Transfer contextual information to cloned view.
$view_copy
->set_arguments($this->view->args);
// Mess up with the field used for distinct have thousands of elements.
// Limit result set to 100: anything above is not user friendly at all.
$view_copy
->set_items_per_page($max_items);
// Remove paging, and page number from context.
if (isset($_GET['items_per_page'])) {
$items_per_page = $_GET['items_per_page'];
unset($_GET['items_per_page']);
}
if (isset($_GET['page'])) {
$exposed_page = $_GET['page'];
unset($_GET['page']);
}
// Manipulate display + default: don't know if fields are overriden.
$display = $view_copy->display[$this->view->current_display];
$display_default = $view_copy->display['default'];
// Initialize the current display handler.
$display->handler = views_get_plugin('display', $view_copy->display[$this->view->current_display]->display_plugin);
$display_default->handler =& $display->handler;
// Remove any exposed form configuration. This showed up with BEF module!
unset($display->display_options['exposed_form']);
unset($display_default->display_options['exposed_form']);
// Also disable attachments.
$display->handler->definition['accept attachments'] = FALSE;
$display_default->handler->definition['accept attachments'] = FALSE;
// If we are using fields from default or current display.
if (isset($display->display_options['fields'])) {
$display_options_fields =& $display->display_options['fields'];
}
else {
$display_options_fields =& $display_default->display_options['fields'];
}
// Original implementation based field matching on ui_name matches
// so we need to preserve backwards compatibility.
$field_to_keep = $this->options['selective_display_field'];
if (empty($field_to_keep)) {
foreach ($display_options_fields as $key => $value) {
if (isset($value['ui_name']) && $value['ui_name'] == $ui_name) {
$field_to_keep = $key;
break;
}
}
}
// Remove all fields but the one used to display and aggregate.
foreach ($display_options_fields as $key => $value) {
if ($key != $field_to_keep) {
unset($display_options_fields[$key]);
}
else {
// If there is a group column on the field, remove it so
// Field Collections will work.
// https://www.drupal.org/node/2333065
unset($display_options_fields[$key]['group_column']);
}
}
// Check to see if the user remembered to add the field.
if (empty($display_options_fields)) {
drupal_set_message(t('Selective query filter must have corresponding field added to view with Administrative Name set to "@name" and Base Type "@type"', array(
'@name' => $ui_name,
'@type' => $base_field,
)), 'error');
return array();
}
// Get ID of field that will be used for rendering.
$display_field = reset($display_options_fields);
// Get field Id.
$display_field_id = $display_field['id'];
// Check that relationships are coherent between Field and Filter.
$no_display_field_relationship = empty($display_field['relationship']) || $display_field['relationship'] === 'none';
$no_filter_relationship = empty($this->options['relationship']) || $this->options['relationship'] === 'none';
$equal = $no_display_field_relationship === TRUE && $no_filter_relationship === TRUE || $display_field['relationship'] === $this->options['relationship'];
if (!$equal) {
drupal_set_message(t('Selective filter "@name": relationship of field and filter must match.', array(
'@name' => $ui_name,
'@type' => $base_field,
)), 'error');
return array();
}
// If main field is excluded from presentation, bring it back.
// Set group type for handler to populate database relationships in query.
$display_field['exclude'] = 0;
$display_field['group_type'] = 'group';
// Remove all sorting: sorts must be added to aggregate fields.
unset($display->display_options['sorts']);
unset($display_default->display_options['sorts']);
// Turn this into an aggregate query.
$display->display_options['group_by'] = 1;
$display->handler->options['group_by'] = 1;
$display_default->display_options['group_by'] = 1;
$display_default->handler->options['group_by'] = 1;
// Aggregate is incompatible with distinct and pure distinct.
// At least it does not make sense as it is implemented now.
unset($display_default->display_options['query']['options']['distinct']);
unset($display_default->display_options['query']['options']['pure_distinct']);
unset($display->display_options['query']['options']['distinct']);
unset($display->display_options['query']['options']['pure_distinct']);
// Make sure we are not using a pager to prevent unnecessary count(*)
// queries.
$display->display_options['pager'] = unserialize('a:2:{s:4:"type";s:4:"none";s:7:"options";a:1:{s:6:"offset";s:1:"0";}}');
$display_default->display_options['pager'] = unserialize('a:2:{s:4:"type";s:4:"none";s:7:"options";a:1:{s:6:"offset";s:1:"0";}}');
// Some style plugins can affect the built query, make sure
// we use a reliable field based style plugin.
$display->display_options['style_plugin'] = 'default';
$display->display_options['style_options'] = unserialize('a:4:{s:9:"row_class";s:0:"";s:17:"default_row_class";i:1;s:17:"row_class_special";i:1;s:11:"uses_fields";i:0;}');
$display->display_options['row_plugin'] = 'fields';
$display->display_options['row_options'] = unserialize('s:6:"fields";');
// Run View.
$view_copy
->execute($this->view->current_display);
// Restore context parameters for real View.
if (isset($items_per_page)) {
$_GET['items_per_page'] = $items_per_page;
}
if (isset($exposed_page)) {
$_GET['page'] = $exposed_page;
}
// Get Handler after execution.
$display_field_handler = $view_copy->field[$display_field_id];
// We show human-readable values when case.
if (method_exists($display_field_handler, 'get_value_options')) {
$display_field_handler
->get_value_options();
}
// Create array of objects for selector.
$oids = array();
$field_alias_original = isset($display_field_handler->aliases[$display_field_handler->real_field]) ? $display_field_handler->aliases[$display_field_handler->real_field] : $display_field_handler->table_alias . '_' . $display_field_handler->real_field;
// views_plugin_query_default::add_field() truncates aliases to 60
// characters.
$field_alias = substr($field_alias_original, 0, 60);
foreach ($view_copy->result as $index => $row) {
// $key = $display_field_handler->get_value($row) should be more robust
// but values are sometimes nested arrays, and we need scalar values
// for the filters.
$key = $display_field_handler
->get_value($row);
if (!is_scalar($key)) {
$key = $row->{$field_alias};
}
$value = strip_tags($view_copy
->render_field($display_field_id, $index));
$oids[$key] = empty($value) ? t('Empty (@key)', array(
'@key' => empty($key) ? json_encode($key) : $key,
)) : $value;
}
// Sort values.
$sort_option = $this->options['selective_display_sort'];
switch ($sort_option) {
case 'ASC':
asort($oids);
break;
case 'DESC':
arsort($oids);
break;
case 'KASC':
ksort($oids);
break;
case 'KDESC':
krsort($oids);
break;
case 'ORIG':
$oids = self::filterOriginalOptions($this
->getOriginalOptions(), array_keys($oids));
break;
case 'NONE':
break;
default:
asort($oids);
}
drupal_alter('views_filters_selective_sort', $oids, $this);
// If limit exceeded this field is not good for being "selective".
if (!empty($max_items) && count($oids) == $max_items) {
drupal_set_message(t('Selective filter "@field" has limited the amount of total results. Please, review you query configuration.', array(
'@field' => $ui_name,
)), 'warning');
}
self::$results[$signature] = $oids;
$view_copy
->destroy();
}
return self::$results[$signature];
}
/**
* Filters a list of original options according to selected set.
*
* @param array $options
* The options list of the original filter.
* @param array $set
* The narrowed set of results provided by the cloned view.
*
* @return array
* The original filter options list narrowed to the cloned query results.
*/
protected static function filterOriginalOptions(array $options, array $set) {
$filtered = array();
foreach ($options as $key => $value) {
// Handle grouped options.
// @see hook_options_list().
if (is_array($value)) {
$nested = self::filterOriginalOptions($value, $set);
if (!empty($nested)) {
$filtered[$key] = $nested;
}
continue;
}
if (in_array($key, $set)) {
$filtered[$key] = $value;
}
}
return $filtered;
}
/**
* Returns the original filter value options, if provides an options list.
*
* @return array|false
* The original filter option list, if available, or FALSE.
*/
protected function getOriginalOptions() {
if (!isset($this->originalOptions)) {
$this->originalOptions = FALSE;
$class = $this->definition['proxy'];
$original_filter = new $class();
if (is_callable(array(
$original_filter,
'get_value_options',
))) {
$original_filter
->set_definition($this->definition);
$options = $original_filter
->get_value_options();
// We store only non-empty array.
if (is_array($options) && !empty($options)) {
$this->originalOptions = $options;
}
else {
$this->originalOptions = array();
}
}
}
return $this->originalOptions;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_handler:: |
public | property | The type of the handler, for example filter/footer/field. | |
views_handler:: |
public | property | Where the $query object will reside:. | 1 |
views_handler:: |
public | property | The actual field in the database table, maybe different on other kind of query plugins/special handlers. | |
views_handler:: |
public | property | The relationship used for this field. | |
views_handler:: |
public | property | The alias of the table of this handler which is used in the query. | |
views_handler:: |
public | property |
The top object of a view. Overrides views_object:: |
|
views_handler:: |
public | function | Check whether current user has access to this handler. | 10 |
views_handler:: |
public | function | Determine if the handler is considered 'broken'. | 6 |
views_handler:: |
public | function | Transform a string by a certain method. | |
views_handler:: |
public | function | Ensure the main table for this handler is in the query. This is used a lot. | 8 |
views_handler:: |
public | function | Submit the exposed handler form. | |
views_handler:: |
public | function | Validate the exposed handler form. | 4 |
views_handler:: |
public | function | Perform any necessary changes to the form exposes prior to storage. There is no need for this function to actually store the data. | |
views_handler:: |
public | function | Provide defaults for the handler. | |
views_handler:: |
public | function | Provide a form for setting options. | 1 |
views_handler:: |
public | function | Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data. | |
views_handler:: |
public | function | Validate the options form. | |
views_handler:: |
public | function | Shortcut to get a handler's raw field value. | |
views_handler:: |
public | function | Get the join object that should be used for this handler. | |
views_handler:: |
public | function | Provide a form for aggregation settings. | 1 |
views_handler:: |
public | function | Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data. | 1 |
views_handler:: |
public | function | If a handler has 'extra options' it will get a little settings widget and another form called extra_options. | 1 |
views_handler:: |
public | function | Determine if this item is 'exposed', meaning it provides form elements to let users modify the view. | |
views_handler:: |
public | function | Determine if the argument needs a style plugin. | 1 |
views_handler:: |
public | function | Provides a unique placeholders for handlers. | |
views_handler:: |
public | function | Run after the view is executed, before the result is cached. | 1 |
views_handler:: |
public | function | Run before the view is built. | 1 |
views_handler:: |
public | function | Sanitize the value for output. | |
views_handler:: |
public | function | Called just prior to query(), this lets a handler set up any relationship it needs. | |
views_handler:: |
public | function | Shortcut to display the exposed options form. | |
views_handler:: |
public | function | Return a string representing this handler's name in the UI. | 9 |
views_handler:: |
public | function | Provides the handler some groupby. | 2 |
views_handler_filter:: |
public | property | Disable the possibility to force a single value. | 6 |
views_handler_filter:: |
public | property | Disable the possibility to allow a exposed input to be optional. | |
views_handler_filter:: |
public | property | Contains the information of the selected item in a gruped filter. | |
views_handler_filter:: |
public | property | Disable the possibility to use operators. | 2 |
views_handler_filter:: |
public | property | Contains the operator which is used on the query. | |
views_handler_filter:: |
public | property | Contains the actual value of the field. | |
views_handler_filter:: |
public | function | Build the form to let users create the group of exposed filters. | |
views_handler_filter:: |
public | function | Provide default options for exposed filters. | |
views_handler_filter:: |
public | function | Save new group items, re-enumerates and remove groups marked to delete. | |
views_handler_filter:: |
public | function | Validate the build group options form. | 1 |
views_handler_filter:: |
public | function | Determine if a filter can be converted into a group. | |
views_handler_filter:: |
public | function |
Determine if a filter can be exposed. Overrides views_handler:: |
5 |
views_handler_filter:: |
public | function | Can this filter be used in OR groups? | 1 |
views_handler_filter:: |
public | function | Transform the input from a grouped filter into a standard filter. | |
views_handler_filter:: |
public | function |
Render our chunk of the exposed filter form when selecting. Overrides views_handler:: |
|
views_handler_filter:: |
public | function |
Tell the renderer about our exposed form. Overrides views_handler:: |
|
views_handler_filter:: |
public | function | Make some translations to a form item to make it more suitable to exposing. | |
views_handler_filter:: |
public | function |
Validate the options form. Overrides views_handler:: |
|
views_handler_filter:: |
public | function | Build a form with a group of operator | values to apply as a single filter. | |
views_handler_filter:: |
public | function | Options available for a grouped filter which uses checkboxes. | |
views_handler_filter:: |
public | function |
Provide some extra help to get the operator/value easier to use. Overrides views_handler:: |
2 |
views_handler_filter:: |
public | function |
Returns TRUE if the exposed filter works like a grouped filter. Overrides views_handler:: |
|
views_handler_filter:: |
public | function |
Indicate whether users can select multiple group items. Overrides views_handler:: |
|
views_handler_filter:: |
public | function | Options form subform for setting the operator. | 6 |
views_handler_filter:: |
public | function | Perform any necessary changes to the form values prior to storage. | |
views_handler_filter:: |
public | function | Validate the operator form. | |
views_handler_filter:: |
public | function |
Simple submit handler. Overrides views_handler:: |
|
views_handler_filter:: |
public | function |
Simple validate handler. Overrides views_handler:: |
1 |
views_handler_filter:: |
public | function | Sanitizes the HTML select element's options. | |
views_handler_filter:: |
public | function | Shortcut to display the build_group/hide button. | |
views_handler_filter:: |
public | function | Shortcut to display the exposed options form. | |
views_handler_filter:: |
public | function |
Shortcut to display the expose/hide button. Overrides views_handler:: |
|
views_handler_filter:: |
public | function | Shortcut to display the operator form. | |
views_handler_filter:: |
public | function | Shortcut to display the value form. | |
views_handler_filter:: |
public | function |
Store the exposed input for processing later. Overrides views_handler:: |
|
views_handler_filter:: |
public | function | If set to remember exposed input in the session, store it there. | |
views_handler_filter:: |
public | function | Validate the options form. | 3 |
views_handler_filter_in_operator:: |
public | property | 1 | |
views_handler_filter_in_operator:: |
public | property | Stores all operations which are available on the form. | |
views_handler_filter_in_operator:: |
public | function |
Check to see if input from the exposed filters should change the behavior. Overrides views_handler_filter:: |
2 |
views_handler_filter_in_operator:: |
public | function |
Display the filter on the administrative summary. Overrides views_handler_filter:: |
2 |
views_handler_filter_in_operator:: |
public | function |
Views handlers use a special construct function. Overrides views_object:: |
|
views_handler_filter_in_operator:: |
public | function |
Provide default options for exposed filters. Overrides views_handler_filter:: |
|
views_handler_filter_in_operator:: |
public | function | This kind of construct makes it relatively easy for a child class to add or remove functionality by overriding this function and adding/removing items from this array. | 1 |
views_handler_filter_in_operator:: |
public | function |
Build strings from the operators() for 'select' options. Overrides views_handler_filter:: |
2 |
views_handler_filter_in_operator:: |
public | function | ||
views_handler_filter_in_operator:: |
public | function | ||
views_handler_filter_in_operator:: |
public | function | ||
views_handler_filter_in_operator:: |
public | function | When using exposed filters, we may be required to reduce the set. | |
views_handler_filter_in_operator:: |
public | function |
Validates the handler against the complete View. Overrides views_handler:: |
|
views_handler_filter_in_operator:: |
public | function |
Perform any necessary changes to the form values prior to storage. Overrides views_handler_filter:: |
2 |
views_handler_filter_selective:: |
protected | property | The original filter value options, if it's an options list handler. | |
views_handler_filter_selective:: |
protected static | property | Static results set. | |
views_handler_filter_selective:: |
protected | function | Tell if two base fields are compatible. | |
views_handler_filter_selective:: |
public | function |
Options form subform for exposed filter options. Overrides views_handler_filter_in_operator:: |
|
views_handler_filter_selective:: |
protected static | function | Filters a list of original options according to selected set. | |
views_handler_filter_selective:: |
protected | function | Returns the original filter value options, if provides an options list. | |
views_handler_filter_selective:: |
protected | function | Get a signature for current filter handler. | |
views_handler_filter_selective:: |
protected | function | Get list of options for current view, only at runtime. | |
views_handler_filter_selective:: |
public | function |
Child classes should be used to override this function and set the
'value options', unless 'options callback' is defined as a valid function
or static public method to generate these values. Overrides views_handler_filter_in_operator:: |
|
views_handler_filter_selective:: |
public | function |
Provide the basic form which calls through to subforms. Overrides views_handler_filter:: |
|
views_handler_filter_selective:: |
public | function |
Information about options for all kinds of purposes will be held here. Overrides views_handler_filter_in_operator:: |
|
views_handler_filter_selective:: |
public | function |
Add this filter to the query. Overrides views_handler_filter_in_operator:: |
|
views_handler_filter_selective:: |
public | function |
Set default options. Overrides views_object:: |
|
views_handler_filter_selective:: |
public | function |
Options form subform for setting options. Overrides views_handler_filter_in_operator:: |
|
views_object:: |
public | property | Handler's definition. | |
views_object:: |
public | property | Except for displays, options for the object will be held here. | 1 |
views_object:: |
function | Collect this handler's option definition and alter them, ready for use. | ||
views_object:: |
public | function | Destructor. | 2 |
views_object:: |
public | function | 1 | |
views_object:: |
public | function | ||
views_object:: |
public | function | Always exports the option, regardless of the default value. | |
views_object:: |
public | function | Set default options on this object. | 1 |
views_object:: |
public | function | Let the handler know what its full definition is. | |
views_object:: |
public | function | Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | |
views_object:: |
public | function | Unpack a single option definition. | |
views_object:: |
public | function | Unpacks each handler to store translatable texts. | |
views_object:: |
public | function |