You are here

public function Wishlist::setCode in Commerce Wishlist 8.3

Sets the wishlist code.

Parameters

string $code: The wishlist code.

Return value

$this

Overrides WishlistInterface::setCode

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

File

src/Entity/Wishlist.php, line 149

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function setCode($code) {
  $this
    ->set('code', $code);
  return $this;
}