X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FRequirementSpecItem.pm;h=d07ed04c890ed37dd2d4f7d79b08c1f1da753621;hb=2f394f05600a5037cbd519352ea10dbcb634eeb5;hp=69265537c3bdd23086cbcba363cbd0853e24e297;hpb=7d66fb875d0efcbab54c46a526a5ce44ad4389e8;p=kivitendo-erp.git diff --git a/SL/DB/RequirementSpecItem.pm b/SL/DB/RequirementSpecItem.pm index 69265537c..d07ed04c8 100644 --- a/SL/DB/RequirementSpecItem.pm +++ b/SL/DB/RequirementSpecItem.pm @@ -99,12 +99,12 @@ sub validate { return @errors; } -sub sorted_children { +sub children_sorted { my ($self, @args) = @_; croak "Not a writer" if @args; - return [ sort { $a->position <=> $b->position } @{ $self->children } ]; + return [ sort { $a->position <=> $b->position } $self->children ]; } sub section { @@ -125,3 +125,51 @@ sub child_type { } 1; +__END__ + +=pod + +=encoding utf8 + +=head1 NAME + +SL::DB::RequirementSpecItem - Items for requirement specs + +=head1 OVERVIEW + +Please see L for the architectual overview. + +=head1 FUNCTIONS + +=over 4 + +=item C + +Returns the C for children of C<$self>. + +=item C + +Returns an array reference of direct children (not of grandchildren) +for C<$self> ordered by their positional column in ascending order. + +=item C
+ +Returns the section this item belongs to. It can be C<$self> if +C<$self> is already a section, its parent or grandparent. + +=item C + +Validates before saving and returns an array of human-readable error +messages in case of an error. + +=back + +=head1 BUGS + +Nothing here yet. + +=head1 AUTHOR + +Moritz Bunkus Em.bunkus@linet-services.deE + +=cut