Revision aa18b62a
Von Sven Schöling vor etwa 11 Jahren hinzugefügt
SL/Controller/Helper/GetModels.pm | ||
---|---|---|
16 | 16 |
$only = [ $only ] if !ref $only; |
17 | 17 |
my %hook_params = @{ $only } ? ( only => $only ) : (); |
18 | 18 |
|
19 |
$class->run_before(sub { $_[0]->{PRIV()} = { current_action => $_[1] }; }, %hook_params); |
|
20 |
|
|
21 | 19 |
my $handlers = _registered_handlers($class); |
22 | 20 |
map { push @{ $handlers->{$_} }, $additional_handlers{$_} if $additional_handlers{$_} } keys %$handlers; |
23 | 21 |
} |
... | ... | |
41 | 39 |
sub get_callback { |
42 | 40 |
my ($self, %override_params) = @_; |
43 | 41 |
|
44 |
my %default_params = _run_handlers($self, 'callback', action => ($self->{PRIV()} || {})->{current_action});
|
|
42 |
my %default_params = _run_handlers($self, 'callback', action => $self->action_name);
|
|
45 | 43 |
|
46 | 44 |
return $self->url_for(%default_params, %override_params); |
47 | 45 |
} |
Auch abrufbar als: Unified diff
GetModels: current_action Hook ersetzt durch action_name