You are here

public function Wishlist::setItems in Commerce Wishlist 8.3

Sets the wishlist items.

Parameters

\Drupal\commerce_wishlist\Entity\WishlistItemInterface[] $wishlist_items: The wishlist items.

Return value

$this

Overrides WishlistInterface::setItems

File

src/Entity/Wishlist.php, line 194

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function setItems(array $wishlist_items) {
  $this
    ->set('wishlist_items', $wishlist_items);
  return $this;
}