private function UnserializedListField::removeEmpty in Legal 8
Same name and namespace in other branches
- 2.0.x src/Plugin/views/field/UnserializedListField.php \Drupal\legal\Plugin\views\field\UnserializedListField::removeEmpty()
Removes all items without value from the extras array.
Parameters
array $extras: The array of extras.
1 call to UnserializedListField::removeEmpty()
- UnserializedListField::render in src/
Plugin/ views/ field/ UnserializedListField.php - Renders the field.
File
- src/
Plugin/ views/ field/ UnserializedListField.php, line 38
Class
- UnserializedListField
- Field handler to flag the node type.
Namespace
Drupal\legal\Plugin\views\fieldCode
private function removeEmpty(array &$extras) {
foreach ($extras as $key => $value) {
if ($value == '') {
unset($extras[$key]);
}
}
}