You are here

interface InvoiceGeneratorInterface in Commerce Invoice 8.2

Hierarchy

Expanded class hierarchy of InvoiceGeneratorInterface

All classes that implement InvoiceGeneratorInterface

2 files declare their use of InvoiceGeneratorInterface
InvoiceController.php in src/Controller/InvoiceController.php
OrderPlacedSubscriber.php in src/EventSubscriber/OrderPlacedSubscriber.php

File

src/InvoiceGeneratorInterface.php, line 8

Namespace

Drupal\commerce_invoice
View source
interface InvoiceGeneratorInterface {

  /**
   * Generates an invoice for the given orders.
   *
   * @param \Drupal\commerce_order\Entity\OrderInterface[] $orders
   *   The orders to generate an invoice for.
   * @param \Drupal\commerce_Store\Entity\StoreInterface $store
   *   The store.
   * @param \Drupal\profile\Entity\ProfileInterface|null $profile
   *   (optional) The billing profile.
   * @param array $values
   *   (optional) An array of values to set on the invoice,
   *   keyed by property name.
   * @param bool $save
   *   (optional) Whether to save the generated invoice and its items or not.
   *   Defaults to TRUE.
   *
   * @return \Drupal\commerce_invoice\Entity\InvoiceInterface|null
   *   The generated invoice, NULL if it could not be generated.
   */
  public function generate(array $orders, StoreInterface $store, ProfileInterface $profile = NULL, array $values = [], $save = TRUE);

}

Members

Namesort descending Modifiers Type Description Overrides
InvoiceGeneratorInterface::generate public function Generates an invoice for the given orders. 1