You are here

public static function Invoice::getWorkflowId in Commerce Invoice 8.2

Gets the workflow ID for the state field.

Parameters

\Drupal\commerce_invoice\Entity\InvoiceInterface $invoice: The invoice.

Return value

string The workflow ID.

File

src/Entity/Invoice.php, line 877

Class

Invoice
Defines the invoice entity class.

Namespace

Drupal\commerce_invoice\Entity

Code

public static function getWorkflowId(InvoiceInterface $invoice) {
  return InvoiceType::load($invoice
    ->bundle())
    ->getWorkflowId();
}