You are here

public function Invoice::setCustomer in Commerce Invoice 8.2

Sets the customer user.

Parameters

\Drupal\user\UserInterface $account: The customer user entity.

Return value

$this

Overrides InvoiceInterface::setCustomer

File

src/Entity/Invoice.php, line 162

Class

Invoice
Defines the invoice entity class.

Namespace

Drupal\commerce_invoice\Entity

Code

public function setCustomer(UserInterface $account) {
  $this
    ->set('uid', $account
    ->id());
  return $this;
}