You are here

class InvoiceFilenameEvent in Commerce Invoice 8.2

Defines the invoice filename event.

Hierarchy

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

Expanded class hierarchy of InvoiceFilenameEvent

See also

\Drupal\commerce_invoice\Event\InvoiceEvents

2 files declare their use of InvoiceFilenameEvent
InvoiceFilenameSubscriber.php in tests/modules/commerce_invoice_test/src/EventSubscriber/InvoiceFilenameSubscriber.php
InvoicePrintBuilder.php in src/InvoicePrintBuilder.php

File

src/Event/InvoiceFilenameEvent.php, line 13

Namespace

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

  /**
   * The invoice filename.
   *
   * @var array
   */
  protected $filename;

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

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

  /**
   * Gets the invoice filename.
   *
   * @return string
   *   The invoice filename.
   */
  public function getFilename() {
    return $this->filename;
  }

  /**
   * Sets the invoice filename.
   *
   * @param string $filename
   *   The invoice filename.
   *
   * @return $this
   */
  public function setFilename($filename) {
    $this->filename = $filename;
    return $this;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
InvoiceFilenameEvent::$filename protected property The invoice filename.
InvoiceFilenameEvent::$invoice protected property The invoice.
InvoiceFilenameEvent::getFilename public function Gets the invoice filename.
InvoiceFilenameEvent::getInvoice public function Gets the invoice.
InvoiceFilenameEvent::setFilename public function Sets the invoice filename.
InvoiceFilenameEvent::__construct public function Constructs a new InvoiceFilenameEvent.