function DateRangeItem::isEmpty
Overrides DateTimeItem::isEmpty
File
-
core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldType/ DateRangeItem.php, line 119
Class
- DateRangeItem
- Plugin implementation of the 'daterange' field type.
Namespace
Drupal\datetime_range\Plugin\Field\FieldTypeCode
public function isEmpty() {
$start_value = $this->get('value')
->getValue();
$end_value = $this->get('end_value')
->getValue();
return ($start_value === NULL || $start_value === '') && ($end_value === NULL || $end_value === '');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.