Skip to content

Added docs about ArgumentValueResolvers #6438

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
Closed
Prev Previous commit
Next Next commit
Added missing use statements to example
  • Loading branch information
Iltar van der Berg committed Apr 29, 2016
commit f491199c2ae8946ca83232fb12ec71a67b79b178
3 changes: 3 additions & 0 deletions cookbook/controller/argument_value_resolver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ action::

namespace AppBundle\Controller;

use AppBundle\User;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppBundle\Entity\User? (I know you're probably not to fond of having this in the Entity namespace, but I think it's the most familar thing for doc readers)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer consistency and familiarity for the developer, so I don't really mind either way. I'll update this to be in the Entity namespace.

use Symfony\Component\HttpFoundation\Response;

class UserController
{
public function indexAction(User $user)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand correctly comments below, you should add "= null" in the signature, right ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only when it's optional

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy