You are here

public function Shipment::getState in Commerce Shipping 8.2

Gets the shipment state.

Return value

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

Overrides ShipmentInterface::getState

File

src/Entity/Shipment.php, line 441

Class

Shipment
Defines the shipment entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

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