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