You are here

public function Wishlist::hasItems in Commerce Wishlist 8.3

Gets whether the wishlist has wishlist items.

Return value

bool TRUE if the wishlist has wishlist items, FALSE otherwise.

Overrides WishlistInterface::hasItems

File

src/Entity/Wishlist.php, line 202

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function hasItems() {
  return !$this
    ->get('wishlist_items')
    ->isEmpty();
}