You are here

protected function Generator::getKey in Commerce Invoice 7.2

Returns the key which differentiates sequential numbers.

Return value

string

1 call to Generator::getKey()
Generator::getNext in src/InvoiceNumber/Generator.php
Returns the next invoice number for the pattern.

File

src/InvoiceNumber/Generator.php, line 38
Invoice Number Generator

Class

Generator
Invoice number generator.

Namespace

Drupal\commerce_invoice\InvoiceNumber

Code

protected function getKey(Invoice $invoice = NULL) {
  return token_replace($this->pattern, [
    'commerce_invoice' => $invoice,
  ]);
}