function DateTimeItem::isEmpty
Overrides Map::isEmpty
1 method overrides DateTimeItem::isEmpty()
- DateRangeItem::isEmpty in core/
modules/ datetime_range/ src/ Plugin/ Field/ FieldType/ DateRangeItem.php - Determines whether the data structure is empty.
File
-
core/
modules/ datetime/ src/ Plugin/ Field/ FieldType/ DateTimeItem.php, line 129
Class
- DateTimeItem
- Plugin implementation of the 'datetime' field type.
Namespace
Drupal\datetime\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this->get('value')
->getValue();
return $value === NULL || $value === '';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.