
Mango::Provider::Wishlists - Provider class for wishlist information

my $provider = Mango::Provider::Wishlists->new;
my $wishlist = $provider->get_by_id(23);

Mango::Provider::Wishlists is the provider class responsible for creating, deleting, updating and searching wishlist information.

Creates a new wishlist provider object. If options are passed to new, those are sent to setup.
my $provider = Mango::Provider::Wishlists->new;
See "new" in Mango::Provider for a list of other possible options.

Creates a new Mango::Wishlist object using the supplied data.
my $wishlist = $provider->create({
user => 23
});
print $wishlist->name;
In addition to using the column names, the following special keys are available:
This can be a user id, or a user object for which this cart is assigned to.
my $wishlist = $provider->create({
user => $user
});
It is recommended that you use this key, rather than setting the foreign key column manually in case it changes later.
Deletes wishlists from the provider matching the supplied filter.
$provider->delete({
id => 23
});
In addition to using the column names, the following special keys are available:
This can be a user id, or a user object for which this profile is assigned to.
$provider->delete({
user => $user
});
It is recommended that you use this key, rather than setting the foreign key column manually in case it changes later.
Returns a Mango::Wishlist object matching the specified id.
my $wishlist = $provider->get_by_id(23);
Returns undef if no matching wishlist can be found.
Returns a list of Mango::Wishlist objects in list context, or a Mango::Iterator in scalar context matching the specified filter.
my @wishlists = $provider->search({
name => 'A%'
});
my $iterator = $provider->search({
name => 'A%'
});
In addition to using the column names, the following special keys are available:
This can be a user id, or a user object for which roles are assigned to.
my @wishlists = $provider->search({
user => $user
});
my $wishlists = $provider->search({
user => $user
});
See "search" in Handel::Cart for a list of other possible options.
Sets the 'updated' column to DateTime->now and saves any changes made to the wishlist back to the underlying store.
my $wishlist = $provider->create(\%data);
$wishlist->name('Favorites');
$provider->update($wishlist);

Mango::Provider, Mango::Wishlist, Handel::Cart

Christopher H. Laco
CPAN ID: CLACO
claco@chrislaco.com
http://today.icantfocus.com/blog/