public function Order::hasItems in Commerce Core 8.2
Gets whether the order has order items.
Return value
bool TRUE if the order has order items, FALSE otherwise.
Overrides OrderInterface::hasItems
File
- modules/
order/ src/ Entity/ Order.php, line 275
Class
- Order
- Defines the order entity class.
Namespace
Drupal\commerce_order\EntityCode
public function hasItems() {
return !$this
->get('order_items')
->isEmpty();
}