Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d41162bc

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID d41162bc35f9555f6bb40f45b18e52ed8824b2fc
  • Vorgänger 9cddaf37
  • Nachfolger 76105d15

Pflichnhefttextblöcke: Kopieren/Einfügen mit Bildern gefixt

Unterschiede anzeigen:

SL/Clipboard/RequirementSpecTextBlock.pm
4 4

  
5 5
use parent qw(SL::Clipboard::Base);
6 6

  
7
use SL::Clipboard::RequirementSpecPicture;
7 8
use SL::Common;
8 9
use SL::Locale::String;
9 10

  
11
sub dump {
12
  my ($self, $object) = @_;
13

  
14
  $self->reload_object($object);
15

  
16
  my $tree          = $self->as_tree($object, exclude => sub { ref($_[0]) !~ m/::RequirementSpecTextBlock$/ });
17
  $tree->{pictures} = [ map { SL::Clipboard::RequirementSpecPicture->new->dump($_) } @{ $object->pictures } ];
18

  
19
  return $tree;
20
}
21

  
10 22
sub describe {
11 23
  my ($self) = @_;
12 24

  
......
18 30

  
19 31
  $object->$_(undef) for qw(output_position position requirement_spec_id);
20 32

  
33
  SL::Clipboard::RequirementSpecPicture->new->_fix_object($_) for @{ $object->pictures || [] };
34

  
21 35
  return $object;
22 36
}
23 37

  
......
42 56
Returns a human-readable description including the title and an
43 57
excerpt of its content.
44 58

  
59
=item C<dump $object>
60

  
61
This specialization reloads C<$object> from the database, loads all of
62
its pictures and dumps it. The pictures are dumped using the clipboard
63
specialization for it, L<SL::Clipboard::RequirementSpecPicture/dump>.
64

  
45 65
=item C<_fix_object $object>
46 66

  
47
Fixes C<$object> by clearing certain columns like the position.
67
Fixes C<$object> by clearing certain columns like the position. Lets
68
pictures be fixed by the clipboard specialization for it,
69
L<SL::Clipboard::RequirementSpecPicture/_fix_object>.
48 70

  
49 71
=back
50 72

  

Auch abrufbar als: Unified diff