Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZWishList Class Reference

## Public Member Functions
| __construct ( $id="")
| store ()
| get ( $id="")
| getByUser ( $user)
| delete ()
| id ()
& | user ()
| setUser ( $user)
| setIsPublic ( $value)
| isPublic ()
& | items ()
| clear ()
| search ( $queryText)

## Public Attributes
| $ID
| $UserID
| $IsPublic
| $IsBought
| $IsConnected

## Detailed Description

! eZTrade eZWishList handles a shopping wishlist

Example:

// Create a new wishlist
$wishlist = new eZWishList();
$wishlist->setUser( $user );
// Store the wishlist to the database
$wishlist->store();
// Fetch all wishlist items
$items = $wishlist->items();
// print contents of the wishlist if it exists
if ($items )
{
foreach ( $items as $item )
{
$product = $item->product();
print( $product->name() . "<br>");
}
}
$items
$items
Definition: admin/orderview.php:211
eZWishList
Definition: ezwishlist.php:63
$item
$item
Definition: classes/admin/linklist.php:228
$wishlist
$wishlist
Definition: customerview.php:149
$product
$product
Definition: homepage.php:202
$user
$user
Definition: user/adlist.php:39

See also
  eZWishListItem eZProductCategory eZOption

Definition at line 62 of file ezwishlist.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZWishList::__construct | ( |  | $id = `""` | ) |

Constructs a new eZWishList object.

If $id is set the object's values are fetched from the database.

Definition at line 70 of file ezwishlist.php.

References $id, and $ID.

## Member Function Documentation

## ◆ clear()

eZWishList::clear | ( |  | ) |

Empties out the wishlist.

Definition at line 291 of file ezwishlist.php.

References $db, $item, $items, $res, eZDB\globalDatabase(), and items().

## ◆ delete()

eZWishList::delete | ( |  | ) |

Deletes a eZWishList object from the database.

Definition at line 177 of file ezwishlist.php.

References $db, $i, $item, $items, $res, eZDB\globalDatabase(), and items().

## ◆ get()

eZWishList::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 125 of file ezwishlist.php.

References $db, $id, $ret, and eZDB\globalDatabase().

## ◆ getByUser()

eZWishList::getByUser | ( |  | $user | ) |

Returns a eZWishList object.

Definition at line 152 of file ezwishlist.php.

References $db, $ret, $user, and eZDB\globalDatabase().

## ◆ id()

eZWishList::id | ( |  | ) |

Returns the object ID.

Definition at line 207 of file ezwishlist.php.

References $ID.

## ◆ isPublic()

eZWishList::isPublic | ( |  | ) |

Returns true if the wishlist is public, false if not.

Definition at line 250 of file ezwishlist.php.

References $ret.

## ◆ items()

& eZWishList::items | ( |  | ) |

Returns all the wishlist items in the wishlist.

An array of eZWishListItem objects are retunred if successful, an empty array.

Definition at line 266 of file ezwishlist.php.

References $db, $item, $ret, and eZDB\globalDatabase().

Referenced by clear(), and delete().

## ◆ search()

eZWishList::search | ( |  | $queryText | ) |

Searches the public wishlists and returns an array with eZWishList objects which matched the search.

Definition at line 322 of file ezwishlist.php.

References $db, $item, $ret, and eZDB\globalDatabase().

## ◆ setIsPublic()

eZWishList::setIsPublic | ( |  | $value | ) |

Sets the wishlist to be public or private.

Definition at line 238 of file ezwishlist.php.

## ◆ setUser()

eZWishList::setUser | ( |  | $user | ) |

Sets the user the wishlist belongs to.

Return false if the applied argument is not and eZUser object.

Definition at line 227 of file ezwishlist.php.

References $user.

## ◆ store()

eZWishList::store | ( |  | ) |

Stores a wishlist to the database.

Definition at line 86 of file ezwishlist.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ user()

& eZWishList::user | ( |  | ) |

Returns the owner of the wishlist as an eZUser object.

Definition at line 215 of file ezwishlist.php.

References $user.

## Member Data Documentation

## ◆ $ID

eZWishList::$ID

Definition at line 346 of file ezwishlist.php.

Referenced by __construct(), and id().

## ◆ $IsBought

eZWishList::$IsBought

Definition at line 349 of file ezwishlist.php.

## ◆ $IsConnected

eZWishList::$IsConnected

Definition at line 350 of file ezwishlist.php.

## ◆ $IsPublic

eZWishList::$IsPublic

Definition at line 348 of file ezwishlist.php.

## ◆ $UserID

eZWishList::$UserID

Definition at line 347 of file ezwishlist.php.

The documentation for this class was generated from the following file:

- ezwishlist.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.