You are here

public function Payment::getState in Commerce Core 8.2

Gets the payment state.

Return value

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

Overrides PaymentInterface::getState

File

modules/payment/src/Entity/Payment.php, line 245

Class

Payment
Defines the payment entity class.

Namespace

Drupal\commerce_payment\Entity

Code

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