You are here

public function InvoiceGeneratorInterface::generate in Commerce Invoice 8.2

Generates an invoice for the given orders.

Parameters

\Drupal\commerce_order\Entity\OrderInterface[] $orders: The orders to generate an invoice for.

\Drupal\commerce_Store\Entity\StoreInterface $store: The store.

\Drupal\profile\Entity\ProfileInterface|null $profile: (optional) The billing profile.

array $values: (optional) An array of values to set on the invoice, keyed by property name.

bool $save: (optional) Whether to save the generated invoice and its items or not. Defaults to TRUE.

Return value

\Drupal\commerce_invoice\Entity\InvoiceInterface|null The generated invoice, NULL if it could not be generated.

1 method overrides InvoiceGeneratorInterface::generate()
InvoiceGenerator::generate in src/InvoiceGenerator.php
Generates an invoice for the given orders.

File

src/InvoiceGeneratorInterface.php, line 29

Class

InvoiceGeneratorInterface

Namespace

Drupal\commerce_invoice

Code

public function generate(array $orders, StoreInterface $store, ProfileInterface $profile = NULL, array $values = [], $save = TRUE);