You are here

public function Wishlist::isDefault in Commerce Wishlist 8.3

Gets whether this is the user's default wishlist.

Return value

bool TRUE if this is the user's default wishlist, FALSE otherwise.

Overrides WishlistInterface::isDefault

2 calls to Wishlist::isDefault()
Wishlist::postSave in src/Entity/Wishlist.php
Acts on a saved entity before the insert or update hook is invoked.
Wishlist::preSave in src/Entity/Wishlist.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/Wishlist.php, line 255

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function isDefault() {
  return (bool) $this
    ->get('is_default')->value;
}