public function StockLevel::isEmpty in Commerce Stock 8
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- modules/
field/ src/ Plugin/ Field/ FieldType/ StockLevel.php, line 80
Class
- StockLevel
- Plugin implementation of the 'commerce_stock_field' field type.
Namespace
Drupal\commerce_stock_field\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL;
}