You are here

public function InventoryItem::isEmpty in farmOS 2.x

Determines whether the data structure is empty.

Return value

bool TRUE if the data structure is empty, FALSE otherwise.

Overrides Map::isEmpty

File

modules/core/inventory/src/Plugin/Field/FieldType/InventoryItem.php, line 63

Class

InventoryItem
Plugin implementation of the 'Inventory' field type.

Namespace

Drupal\farm_inventory\Plugin\Field\FieldType

Code

public function isEmpty() {
  return ($this->measure === NULL || $this->measure === '') && ($this->value === NULL || $this->value === '') && ($this->units === NULL || $this->units === '');
}