You are here

interface WishlistAssignmentInterface in Commerce Wishlist 8.3

Handles assigning anonymous wishlists to user accounts.

Invoked on login.

Hierarchy

Expanded class hierarchy of WishlistAssignmentInterface

All classes that implement WishlistAssignmentInterface

File

src/WishlistAssignmentInterface.php, line 13

Namespace

Drupal\commerce_wishlist
View source
interface WishlistAssignmentInterface {

  /**
   * Assigns the anonymous wishlist to the given user account.
   *
   * @param \Drupal\commerce_wishlist\Entity\WishlistInterface $wishlist
   *   The wishlist wishlist.
   * @param \Drupal\user\UserInterface $account
   *   The user account.
   */
  public function assign(WishlistInterface $wishlist, UserInterface $account);

  /**
   * Assigns multiple anonymous wishlists to the given user account.
   *
   * @param \Drupal\commerce_wishlist\Entity\WishlistInterface[] $wishlists
   *   The wishlists.
   * @param \Drupal\user\UserInterface $account
   *   The account.
   */
  public function assignMultiple(array $wishlists, UserInterface $account);

}

Members

Namesort descending Modifiers Type Description Overrides
WishlistAssignmentInterface::assign public function Assigns the anonymous wishlist to the given user account. 1
WishlistAssignmentInterface::assignMultiple public function Assigns multiple anonymous wishlists to the given user account. 1