public function OrderInterface::hasItem in Commerce Core 8.2
Checks whether the order has a given order item.
Parameters
\Drupal\commerce_order\Entity\OrderItemInterface $order_item: The order item.
Return value
bool TRUE if the order item was found, FALSE otherwise.
1 method overrides OrderInterface::hasItem()
- Order::hasItem in modules/
order/ src/ Entity/ Order.php - Checks whether the order has a given order item.
File
- modules/
order/ src/ Entity/ OrderInterface.php, line 217
Class
- OrderInterface
- Defines the interface for orders.
Namespace
Drupal\commerce_order\EntityCode
public function hasItem(OrderItemInterface $order_item);