public FieldItemList::filterEmptyItems()
Filters out empty field items and re-numbers the item deltas.
Return value
$this
Overrides FieldItemListInterface::filterEmptyItems
File
- core/lib/Drupal/Core/Field/FieldItemList.php, line 90
Class
- FieldItemList
- Represents an entity field; that is, a list of field item objects.
Namespace
Drupal\Core\Field
Code
public function filterEmptyItems() { $this->filter(function($item) { return !$item->isEmpty(); }); return $this; }
Please login to continue.