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.
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 });
This can be a user id, or a user object for which this profile is assigned to.
$provider->delete({ user => $user });
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%' });
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/
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.