add automatic proxy system for passing objects to Template::Toolkit

This commit is contained in:
Graham Knop 2011-06-15 18:19:16 -05:00
parent 6dfeb6ef1a
commit 0a09ea4895
4 changed files with 187 additions and 47 deletions

View file

@ -0,0 +1,22 @@
package WebGUI::Template::Proxy::Asset;
use strict;
use warnings;
use base 'WebGUI::Template::Proxy';
sub _get_allowed {
my $self = shift;
my $asset = shift;
my @properties = $asset->meta->get_all_property_list;
return @properties;
}
sub parent {
my $self = shift;
my $parent = $self->{_asset}->parentNode;
$self->_wrap($parent);
return $parent;
}
1;