public function PriceTableItem::isEmpty in Commerce Price Table 8
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/ PriceTableItem.php, line 71
Class
- PriceTableItem
- Plugin implementation of the 'commerce_price_table' field type.
Namespace
Drupal\commerce_price_table\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('amount')
->getValue();
return $value === NULL || $value === '';
}