You are here

public function Order::getState in Commerce Core 8.2

Gets the order state.

Return value

\Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface The order state.

Overrides OrderInterface::getState

File

modules/order/src/Entity/Order.php, line 525

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function getState() {
  return $this
    ->get('state')
    ->first();
}