Skip to content

Replace more occurrences of Controller by AbstractController #10045

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

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ and many others that you'll learn about next.
Generating URLs
~~~~~~~~~~~~~~~

The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::generateUrl`
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::generateUrl`
method is just a helper method that generates the URL for a given route::

$url = $this->generateUrl('app_lucky_number', array('max' => 10));
Expand Down Expand Up @@ -328,7 +328,7 @@ special type of exception::
return $this->render(...);
}

The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::createNotFoundException`
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::createNotFoundException`
method is just a shortcut to create a special
:class:`Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException`
object, which ultimately triggers a 404 HTTP response inside Symfony.
Expand Down Expand Up @@ -581,7 +581,7 @@ the :phpfunction:`json_encode` function is used.
Streaming File Responses
~~~~~~~~~~~~~~~~~~~~~~~~

You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::file`
You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::file`
helper to serve a file from inside a controller::

public function download()
Expand Down
2 changes: 1 addition & 1 deletion controller/forwarding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ How to Forward Requests to another Controller
=============================================

Though not very common, you can also forward to another controller internally
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward`
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::forward`
method. Instead of redirecting the user's browser, this makes an "internal"
sub-request and calls the defined controller. The ``forward()`` method returns
the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned
Expand Down
2 changes: 1 addition & 1 deletion security/csrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ token and store it as a hidden field of the form:
</form>

Then, get the value of the CSRF token in the controller action and use the
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::isCsrfTokenValid`
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::isCsrfTokenValid`
to check its validity::

use Symfony\Component\HttpFoundation\Request;
Expand Down