public function YearOnlyItem::isEmpty in Year Only 9.0.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldType/YearOnlyItem.php \Drupal\yearonly\Plugin\Field\FieldType\YearOnlyItem::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/ YearOnlyItem.php, line 55
Class
- YearOnlyItem
- Plugin implementation of the 'yearonly' field type.
Namespace
Drupal\yearonly\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '';
}