Revision 34948207
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/RequirementSpec.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
5 |
use Carp; |
|
6 |
|
|
5 | 7 |
use SL::DB::MetaSetup::RequirementSpec; |
6 | 8 |
use SL::DB::Manager::RequirementSpec; |
7 | 9 |
use SL::Locale::String; |
... | ... | |
41 | 43 |
return 1; |
42 | 44 |
} |
43 | 45 |
|
46 |
sub text_blocks_for_position { |
|
47 |
my ($self, $output_position) = @_; |
|
48 |
|
|
49 |
return [ sort { $a->position <=> $b->position } grep { $_->output_position == $output_position } @{ $self->text_blocks } ]; |
|
50 |
} |
|
51 |
|
|
52 |
sub sections { |
|
53 |
my ($self, @rest) = @_; |
|
54 |
|
|
55 |
croak "This sub is not a writer" if @rest; |
|
56 |
|
|
57 |
return [ sort { $a->position <=> $b->position } grep { !$_->parent_id } @{ $self->items } ]; |
|
58 |
} |
|
59 |
|
|
44 | 60 |
1; |
Auch abrufbar als: Unified diff
Pflichtenheft-Model: Accessoren für Textblöcke, Abschnitte