public function SmartDateItem::isEmpty in Smart Date 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 8 src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 3.0.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 3.1.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 3.2.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 3.3.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
- 3.4.x src/Plugin/Field/FieldType/SmartDateItem.php \Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- src/
Plugin/ Field/ FieldType/ SmartDateItem.php, line 147
Class
- SmartDateItem
- Plugin implementation of the 'smartdate' field type.
Namespace
Drupal\smart_date\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 === '');
}