protected function views_test_plugin_style_test_mapping::filter_numeric_fields in Views (for Drupal 7) 7.3
Restricts the allowed fields to only numeric fields.
Parameters
array $fields: An array of field labels, keyed by the field ID.
File
- tests/
test_plugins/ views_test_plugin_style_test_mapping.inc, line 45 - Definition of views_test_plugin_style_test_mapping.
Class
- views_test_plugin_style_test_mapping
- Provides a test mapping style plugin.
Code
protected function filter_numeric_fields(&$fields) {
foreach ($this->view->field as $id => $field) {
if (!$field instanceof views_handler_field_numeric) {
unset($fields[$id]);
}
}
}