You are here

public function OrderItemMatcherInterface::match in Commerce Core 8.2

Finds the first matching order item for the given order item.

Parameters

\Drupal\commerce_order\Entity\OrderItemInterface $order_item: The order item.

\Drupal\commerce_order\Entity\OrderItemInterface[] $order_items: The order items to match against.

Return value

\Drupal\commerce_order\Entity\OrderItemInterface|null A matching order item, or NULL if none was found.

1 method overrides OrderItemMatcherInterface::match()
OrderItemMatcher::match in modules/cart/src/OrderItemMatcher.php
Finds the first matching order item for the given order item.

File

modules/cart/src/OrderItemMatcherInterface.php, line 32

Class

OrderItemMatcherInterface
Finds matching order items.

Namespace

Drupal\commerce_cart

Code

public function match(OrderItemInterface $order_item, array $order_items);