add "asset" property to AssetHelpers.

Simplifies the API and allows us to have getForm and getUrl to make
asset helpers easier to build.
This commit is contained in:
Doug Bell 2011-03-25 14:49:44 -05:00
parent df31c13e13
commit 698f40a6dd
23 changed files with 216 additions and 123 deletions

View file

@ -32,15 +32,16 @@ These methods are available from this class:
#-------------------------------------------------------------------
=head2 process ( $asset )
=head2 process ( )
Create a shortcut to the asset on the clipboard.
=cut
sub process {
my ($self, $asset) = @_;
my $session = $asset->session;
my ($self) = @_;
my $session = $self->session;
my $asset = $self->asset;
my $i18n = WebGUI::International->new( $session, 'WebGUI' );
return { error => $i18n->get('39') } if !$asset->canView;