Add POD to HasObjects role for FormBuilder.
This commit is contained in:
parent
05b899db69
commit
8176f78682
1 changed files with 43 additions and 0 deletions
|
|
@ -1,5 +1,20 @@
|
|||
package WebGUI::FormBuilder::Role::HasObjects;
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
this software.
|
||||
-------------------------------------------------------------------
|
||||
http://www.plainblack.com info@plainblack.com
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
use Moose::Role;
|
||||
|
||||
has 'objects' => (
|
||||
|
|
@ -10,6 +25,34 @@ has 'objects' => (
|
|||
|
||||
# Objects combines "fields", "fieldsets", and "tabsets"
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::FormBuilder::Role::HasObjects
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Role that provides an attribute for holding a set of objects.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
This method is used by several FormBuilder packages that need to nest objects. For example, a FormBuilder object
|
||||
can have multiple tabs, each of which can contain multiple form fields. The role provides an objects attribute,
|
||||
and an addObject method for pushing an object onto the list of objects.
|
||||
|
||||
with 'WebGUI::FormBuilder::Role::HasObjects';
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 addObject ($object)
|
||||
|
||||
Adds $object to the list of objects for the consumer.
|
||||
|
||||
=head3 $object
|
||||
|
||||
Some variable, or data. It really can be anything.
|
||||
|
||||
=cut
|
||||
|
||||
sub addObject {
|
||||
my ( $self, $object ) = @_;
|
||||
push @{$self->objects}, $object;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue