You are here

public function Invoice::getCustomerId in Commerce Invoice 8.2

Gets the customer user ID.

Return value

int The customer user ID ('0' if anonymous).

Overrides InvoiceInterface::getCustomerId

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

File

src/Entity/Invoice.php, line 170

Class

Invoice
Defines the invoice entity class.

Namespace

Drupal\commerce_invoice\Entity

Code

public function getCustomerId() {
  return $this
    ->get('uid')->target_id;
}