You are here

public function PriceList::setCustomerId in Commerce Pricelist 8.2

Sets the customer ID.

Parameters

int $uid: The customer ID.

Return value

$this

Overrides PriceListInterface::setCustomerId

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 178

Class

PriceList
Defines the Price list entity.

Namespace

Drupal\commerce_pricelist\Entity

Code

public function setCustomerId($uid) {
  $this
    ->set('customers', [
    'target_id' => $uid,
  ]);
  return $this;
}