You are here

public function ViewsField::render in Commerce Invoice 7.2

File

src/InvoiceNumber/ViewsField.php, line 14
Provides views field for invoice numbers.

Class

ViewsField

Namespace

Drupal\commerce_invoice\InvoiceNumber

Code

public function render($values) {
  $key = $this
    ->get_value($values, 'number_key');
  $sequence = $this
    ->get_value($values);
  $pattern_name = $this
    ->get_value($values, 'number_pattern');
  $invoiceNumber = new InvoiceNumber($sequence, $key, $pattern_name);
  return (string) $invoiceNumber;
}