Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a7c70594

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID a7c70594d6b9d8c4b1ef891bbe6a72b42d6bc741
  • Vorgänger 39294de3
  • Nachfolger 4065042c

Dokumentation

Unterschiede anzeigen:

SL/Helper/Flash.pm
20 20
}
21 21

  
22 22
1;
23

  
24
__END__
25

  
26
=head1 NAME
27

  
28
SL::Helpers::Flash - helper functions for storing messages to be
29
displayed to the user
30

  
31
=head1 SYNOPSIS
32

  
33
The flash is a store for messages that should be displayed to the
34
user. Each message has a category which is usually C<information>,
35
C<warning> or C<error>. The messages in each category are grouped and
36
displayed in colors appropriate for their severity (e.g. errors in
37
red).
38

  
39
Messages are rendered either by calling the function C<render_flash>
40
or by including the flash sub-template from a template with the
41
following code:
42

  
43
  [%- INCLUDE 'common/flash.html' %]
44

  
45
=head1 FUNCTIONS
46

  
47
=over 4
48

  
49
=item C<flash $category, $message>
50

  
51
Stores a message for the given category. The category can be either
52
C<information>, C<warning> or C<error>. C<info> can also be used as an
53
alias for C<information>.
54

  
55
=item C<render_flash>
56

  
57
Outputs the flash message by parsing the C<common/flash.html> template
58
file.
59

  
60
=back
61

  
62
=head1 AUTHOR
63

  
64
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
65

  
66
=cut

Auch abrufbar als: Unified diff