protected function MappingTest::filterNumericFields in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/modules/views_test_data/src/Plugin/views/style/MappingTest.php \Drupal\views_test_data\Plugin\views\style\MappingTest::filterNumericFields()
Restricts the allowed fields to only numeric fields.
Parameters
array $fields: An array of field labels, keyed by the field ID.
File
- core/
modules/ views/ tests/ modules/ views_test_data/ src/ Plugin/ views/ style/ MappingTest.php, line 60 - Contains \Drupal\views_test_data\Plugin\views\style\MappingTest.
Class
- MappingTest
- Provides a test plugin for the mapping style.
Namespace
Drupal\views_test_data\Plugin\views\styleCode
protected function filterNumericFields(&$fields) {
foreach ($this->view->field as $id => $field) {
if (!$field instanceof NumericField) {
unset($fields[$id]);
}
}
}