From 0edd58f84859dc79727e24300e2adc31e174b4d8 Mon Sep 17 00:00:00 2001 From: Scott Walters Date: Sun, 17 Feb 2013 15:02:16 -0500 Subject: [PATCH] add a getProperty to WebGUI::Definition::Role::Object as Asset.pm's www_add wants this for picking out noFormPost data from the property definition in assets. fixes a fatal error when trying to add the Request Tracker and perhaps other assets. --- lib/WebGUI/Definition/Role/Object.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/WebGUI/Definition/Role/Object.pm b/lib/WebGUI/Definition/Role/Object.pm index 9e1a8e815..451aa9bff 100644 --- a/lib/WebGUI/Definition/Role/Object.pm +++ b/lib/WebGUI/Definition/Role/Object.pm @@ -179,6 +179,20 @@ sub getFormProperties { #------------------------------------------------------------------- +=head2 getProperty ( $property_name ) + +Returns the structure used to create a property. + +=cut + +sub getProperty { + my $self = shift; + my $property_name = shift; + return $self->meta->find_attribute_by_name( $property_name ); +} + +#------------------------------------------------------------------- + =head2 getProperties ( ) Returns a list of the names of all properties of the object, as set by the Definition. @@ -190,5 +204,6 @@ sub getProperties { return $self->meta->get_all_property_list; } + 1;