public function AddToCartItem::isEmpty in Basic cart 8
Same name and namespace in other branches
- 8.6 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
- 8.0 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
- 8.2 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
- 8.3 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
- 8.4 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
- 8.5 src/Plugin/Field/FieldType/AddToCartItem.php \Drupal\basic_cart\Plugin\Field\FieldType\AddToCartItem::isEmpty()
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/ AddToCartItem.php, line 41
Class
- AddToCartItem
- Plugin implementation of the 'addtocart' field type.
Namespace
Drupal\basic_cart\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '';
}