Skip to content

method name is 'index' not 'indexAction' #10046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions create_framework/http_kernel_controller_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Update the route definition accordingly::

$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array(
'year' => null,
'_controller' => array(new LeapYearController(), 'indexAction'),
'_controller' => array(new LeapYearController(), 'index'),
)));

The move is pretty straightforward and makes a lot of sense as soon as you
Expand Down Expand Up @@ -64,7 +64,7 @@ two colons and a method name as a valid callback, like 'class::method'::

$routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', array(
'year' => null,
'_controller' => 'LeapYearController::indexAction',
'_controller' => 'LeapYearController::index',
)));

To make this code work, modify the framework code to use the controller
Expand Down