protected function DimensionsItem::checkEmpty in Physical Fields 8
Checks whether the given value is NULL or an empty string.
Excludes zeroes from the check because they are considered valid numbers in the context of this field.
Parameters
string $value: The value.
Return value
bool TRUE if the value is empty, FALSE otherwise.
1 call to DimensionsItem::checkEmpty()
- DimensionsItem::isEmpty in src/
Plugin/ Field/ FieldType/ DimensionsItem.php - Determines whether the data structure is empty.
File
- src/
Plugin/ Field/ FieldType/ DimensionsItem.php, line 122
Class
- DimensionsItem
- Plugin implementation of the 'physical_dimensions' field type.
Namespace
Drupal\physical\Plugin\Field\FieldTypeCode
protected function checkEmpty($value) {
return is_null($value) || $value === '';
}