You are here

public function Invoice::getState in Commerce Invoice 8.2

Gets the invoice state.

Return value

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

Overrides InvoiceInterface::getState

File

src/Entity/Invoice.php, line 471

Class

Invoice
Defines the invoice entity class.

Namespace

Drupal\commerce_invoice\Entity

Code

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