You are here

public function Invoice::getFile in Commerce Invoice 8.2

Gets the invoice file.

Return value

\Drupal\file\FileInterface|null The invoice file, NULL if empty.

Overrides InvoiceInterface::getFile

1 call to Invoice::getFile()
Invoice::preSave in src/Entity/Invoice.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/Invoice.php, line 554

Class

Invoice
Defines the invoice entity class.

Namespace

Drupal\commerce_invoice\Entity

Code

public function getFile() {
  return $this
    ->get('invoice_file')->entity;
}