You are here

protected function CivicrmEntityViewsData::processViewsDataForListInteger in CiviCRM Entity 8.3

Provides Views integration for list_integer fields.

This does not provide arguments, as that required an alter against the entire Views data array, which is not possible here.

Parameters

string $table: The table the language field is added to.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.

array $views_field: The views field data.

string $field_column_name: The field column being processed.

See also

options_field_views_data()

File

src/CivicrmEntityViewsData.php, line 239

Class

CivicrmEntityViewsData

Namespace

Drupal\civicrm_entity

Code

protected function processViewsDataForListInteger($table, FieldDefinitionInterface $field_definition, array &$views_field, $field_column_name) {
  $views_field['filter']['id'] = 'list_field';
  $views_field['filter']['field_name'] = $field_definition
    ->getName();
  $views_field['argument']['id'] = 'number_list_field';
  $views_field['argument']['field_name'] = $field_definition
    ->getName();
}