Created
August 6, 2012 16:09
-
-
Save anonymous/3275979 to your computer and use it in GitHub Desktop.
errore in esecuzione della Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/Acme/StoreBundle/Controller/DefaultController.php | |
public function showAction($id) | |
{ | |
$repository = $this->getDoctrine() | |
->getRepository('AcmeStoreBundle:Product'); | |
$product = $repository->find($id); | |
if (!$product) { | |
throw $this->createNotFoundException('Nessun prodotto trovato per num id: '.$id); | |
} | |
// fare qualcosa, come passare l’oggetto $product a un template | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment