public function DurationField::isEmpty in Duration Field 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldType/DurationField.php \Drupal\duration_field\Plugin\Field\FieldType\DurationField::isEmpty()
- 3.0.x src/Plugin/Field/FieldType/DurationField.php \Drupal\duration_field\Plugin\Field\FieldType\DurationField::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/ DurationField.php, line 88
Class
- DurationField
- Provides the 'duration' field type.
Namespace
Drupal\duration_field\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '';
}