You are here

public function Wishlist::setDefault in Commerce Wishlist 8.3

Sets whether this is the user's default wishlist.

Parameters

bool $default: Whether this is the user's default wishlist.

Return value

$this

Overrides WishlistInterface::setDefault

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

File

src/Entity/Wishlist.php, line 262

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function setDefault($default) {
  $this
    ->set('is_default', (bool) $default);
  return $this;
}