From 3be9ca736a1af089369fc26ce74c45e8bf3c86f8 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 29 Jul 2010 15:49:40 -0500 Subject: [PATCH] add processAssetHelper method to process helpers --- lib/WebGUI/Admin.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/WebGUI/Admin.pm b/lib/WebGUI/Admin.pm index 1b94d796d..10be6dbcc 100644 --- a/lib/WebGUI/Admin.pm +++ b/lib/WebGUI/Admin.pm @@ -292,6 +292,25 @@ sub www_getTreeData { #---------------------------------------------------------------------- +=head2 www_processAssetHelper ( ) + +Process the given asset helper with the given asset + +=cut + +sub www_processAssetHelper { + my ( $self ) = @_; + my $session = $self->session; + my ( $form ) = $session->quick(qw{ form }); + + my $assetId = $form->get('assetId'); + my $class = $form->get('className'); + my $asset = WebGUI::Asset->newById( $session, $assetId ); + return JSON->new->encode( $class->process( $asset ) ); +} + +#---------------------------------------------------------------------- + =head2 www_view ( session ) Show the main Admin console wrapper