You are here

FieldList.php in Views (for Drupal 7) 8.3

File

lib/Views/field/Plugin/views/filter/FieldList.php
View source
<?php

/**
 * @file
 * Definition of Views\field\Plugin\views\filter\FieldList.
 */
namespace Views\field\Plugin\views\filter;

use Drupal\views\Plugin\views\filter\ManyToOne;
use Drupal\Core\Annotation\Plugin;

/**
 * Filter handler which uses list-fields as options.
 *
 * @ingroup views_filter_handlers
 *
 * @Plugin(
 *   id = "field_list",
 *   module = "field"
 * )
 */
class FieldList extends ManyToOne {
  function get_value_options() {
    $field = field_info_field($this->definition['field_name']);
    $this->value_options = list_allowed_values($field);
  }

}

Classes

Namesort descending Description
FieldList Filter handler which uses list-fields as options.