Test adding children, along with automatically adding folders.
This commit is contained in:
parent
02dc71055b
commit
bd59ac6006
2 changed files with 16 additions and 3 deletions
|
|
@ -34,8 +34,11 @@ sub addChild {
|
|||
my $self = shift;
|
||||
my ($properties) = @_;
|
||||
##Allow subclassing
|
||||
return undef unless $properties->{className} =~ /^WebGUI::Asset::Story::/;
|
||||
return $self->SUPER::addChild(@_);
|
||||
return undef unless $properties->{className} =~ /^WebGUI::Asset::Story/;
|
||||
my $todayFolder = $self->getFolder;
|
||||
return undef unless $todayFolder;
|
||||
my $story = $todayFolder->addChild(@_);
|
||||
return $story;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue