You are here

protected function OrderStateCondition::doEvaluate in Ubercart 8.4

Checks the current order state.

Parameters

\Drupal\uc_order\OrderInterface $order: The order.

\Drupal\uc_order\OrderStatusInterface $order_state: The order state.

Return value

bool TRUE if the order has one of the given order states.

File

uc_order/src/Plugin/Condition/OrderStateCondition.php, line 58

Class

OrderStateCondition
Provides 'Check order's workflow state' condition.

Namespace

Drupal\uc_order\Plugin\Condition

Code

protected function doEvaluate(OrderInterface $order, OrderStatusInterface $order_state) {
  return $order
    ->getStateId() == $order_state;
}