public function ViewsReferenceItem::isEmpty in Views Reference Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/ViewsReferenceItem.php \Drupal\viewsreference\Plugin\Field\FieldType\ViewsReferenceItem::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides EntityReferenceItem::isEmpty
1 call to ViewsReferenceItem::isEmpty()
- ViewsReferenceItem::hasNewEntity in src/
Plugin/ Field/ FieldType/ ViewsReferenceItem.php - Determines whether the item holds an unsaved entity.
File
- src/
Plugin/ Field/ FieldType/ ViewsReferenceItem.php, line 136
Class
- ViewsReferenceItem
- Defines the 'viewsreference' entity field type.
Namespace
Drupal\viewsreference\Plugin\Field\FieldTypeCode
public function isEmpty() {
$return = parent::isEmpty();
// Avoid loading the entity by first checking the 'display_id'.
if ($this->display_id === NULL || $this->display_id == '') {
return TRUE;
}
return $return;
}