You are here

class InvoiceEvent in Commerce Invoice 8.2

Defines the invoice event.

Hierarchy

  • class \Drupal\commerce_invoice\Event\InvoiceEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of InvoiceEvent

See also

\Drupal\commerce_invoice\Event\OrderEvents

File

src/Event/InvoiceEvent.php, line 13

Namespace

Drupal\commerce_invoice\Event
View source
class InvoiceEvent extends Event {

  /**
   * The invoice.
   *
   * @var \Drupal\commerce_invoice\Entity\InvoiceInterface
   */
  protected $invoice;

  /**
   * Constructs a new InvoiceEvent.
   *
   * @param \Drupal\commerce_invoice\Entity\InvoiceInterface $invoice
   *   The invoice.
   */
  public function __construct(InvoiceInterface $invoice) {
    $this->invoice = $invoice;
  }

  /**
   * Gets the invoice.
   *
   * @return \Drupal\commerce_invoice\Entity\InvoiceInterface
   *   Gets the invoice.
   */
  public function getInvoice() {
    return $this->invoice;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
InvoiceEvent::$invoice protected property The invoice.
InvoiceEvent::getInvoice public function Gets the invoice.
InvoiceEvent::__construct public function Constructs a new InvoiceEvent.