You are here

public function PriceList::setCustomer in Commerce Pricelist 8.2

Sets the customer.

Parameters

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

Return value

$this

Overrides PriceListInterface::setCustomer

Deprecated

in commerce_pricelist:8.x-2.0 and is removed from commerce_pricelist:8.x-3.0. Use $this->setCustomers() instead.

See also

https://www.drupal.org/project/commerce_pricelist/issues/3171289

File

src/Entity/PriceList.php, line 153

Class

PriceList
Defines the Price list entity.

Namespace

Drupal\commerce_pricelist\Entity

Code

public function setCustomer(UserInterface $user) {
  return $this
    ->setCustomers([
    $user,
  ]);
}