public function Dimension::isEmpty in Dimension 2.1.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::isEmpty()
- 2.0.x src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides NumericItemBase::isEmpty
File
- src/
Plugin/ Field/ FieldType/ Dimension.php, line 272
Class
Namespace
Drupal\dimension\Plugin\Field\FieldTypeCode
public function isEmpty() : bool {
/** @noinspection StaticInvocationViaThisInspection */
foreach ($this
->fields() as $key => $label) {
if (empty($this->{$key}) && (string) $this->{$key} !== '0') {
return TRUE;
}
}
return FALSE;
}