You are here

public function PriceModifiedItem::isEmpty in Price 8

Same name and namespace in other branches
  1. 3.x src/Plugin/Field/FieldType/PriceModifiedItem.php \Drupal\price\Plugin\Field\FieldType\PriceModifiedItem::isEmpty()
  2. 3.0.x src/Plugin/Field/FieldType/PriceModifiedItem.php \Drupal\price\Plugin\Field\FieldType\PriceModifiedItem::isEmpty()

Determines whether the data structure is empty.

Return value

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

Overrides PriceItem::isEmpty

File

src/Plugin/Field/FieldType/PriceModifiedItem.php, line 105

Class

PriceModifiedItem
Plugin implementation of the 'modified price' field type.

Namespace

Drupal\price\Plugin\Field\FieldType

Code

public function isEmpty() {
  return $this->number === NULL || $this->number === '' || empty($this->currency_code) || empty($this->modifier);
}