rework how validParent works, and where it is checked. Add an explicit check for it in addChild, and remove a bunch of overridden addChild methods.
This commit is contained in:
parent
a8496c4d15
commit
88ec09d279
12 changed files with 78 additions and 110 deletions
|
|
@ -1901,18 +1901,14 @@ sub setRelatedLinks {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 validParent
|
||||
=head2 valid_parent_classes
|
||||
|
||||
Make sure that the current session asset is a Calendar for pasting and adding checks.
|
||||
|
||||
This is a class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub validParent {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
return $session->asset->isa('WebGUI::Asset::Wobject::Calendar');
|
||||
sub valid_parent_classes {
|
||||
return [qw/WebGUI::Asset::Wobject::Calendar/];
|
||||
}
|
||||
|
||||
####################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue