public function BatCalendarUnitTypeReference::isEmpty in Booking and Availability Management Tools for Drupal 8
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- modules/
bat_calendar_reference/ src/ Plugin/ Field/ FieldType/ BatCalendarUnitTypeReference.php, line 48 - Contains \Drupal\bat_calendar_reference\Plugin\Field\FieldType\BatCalendarUnitTypeReference.
Class
- BatCalendarUnitTypeReference
- Plugin annotation @FieldType( id = "bat_calendar_unit_type_reference", label = @Translation("BAT Calendar Unit Type Reference"), description = @Translation("Display unit type events information embedded from other fieldable content."), …
Namespace
Drupal\bat_calendar_reference\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('unit_type_id')
->getValue();
return $value === NULL || $value === '';
}