Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision aa18b62a

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID aa18b62a0d5ae5640e9061c44e10c19cfb3dbf9f
  • Vorgänger c301b22e
  • Nachfolger 0ac42632

GetModels: current_action Hook ersetzt durch action_name

Unterschiede anzeigen:

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