public function DateTimeItem::isEmpty in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/datetime/src/Plugin/Field/FieldType/DateTimeItem.php \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- core/
modules/ datetime/ src/ Plugin/ Field/ FieldType/ DateTimeItem.php, line 126 - Contains \Drupal\datetime\Plugin\Field\FieldType\DateTimeItem.
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 === '';
}