function bibcite_entity_field_views_data_alter in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/bibcite_entity.module \bibcite_entity_field_views_data_alter()
Implements hook_field_views_data_alter().
See also
taxonomy_field_views_data_alter()
File
- modules/
bibcite_entity/ bibcite_entity.module, line 33 - Module hooks.
Code
function bibcite_entity_field_views_data_alter(array &$data, FieldStorageConfigInterface $field_storage) {
if ($field_storage
->getType() == 'entity_reference' && $field_storage
->getSetting('target_type') == 'bibcite_keyword') {
foreach ($data as $table_name => $table_data) {
foreach ($table_data as $field_name => $field_data) {
if (isset($field_data['filter']) && $field_name != 'delta') {
$data[$table_name][$field_name]['filter']['id'] = 'bibcite_keyword_id';
}
}
}
}
}