public function FieldCollection::isEmpty in Field collection 8
Same name and namespace in other branches
- 8.3 src/Plugin/Field/FieldType/FieldCollection.php \Drupal\field_collection\Plugin\Field\FieldType\FieldCollection::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- src/
Plugin/ Field/ FieldType/ FieldCollection.php, line 213
Class
- FieldCollection
- Plugin implementation of the 'field_collection' field type.
Namespace
Drupal\field_collection\Plugin\Field\FieldTypeCode
public function isEmpty() {
if ($this->value) {
return FALSE;
}
else {
if ($this
->getFieldCollectionItem()) {
return $this
->getFieldCollectionItem()
->isEmpty();
}
}
return TRUE;
}