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