function DateTimeItem::isEmpty
Same name in other branches
- 8.9.x core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::isEmpty()
- 10 core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::isEmpty()
- 11.x core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\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 124
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.