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
doctrine: | |
dbal: | |
driver: "%database_driver%" | |
host: "%database_host%" | |
port: "%database_port%" | |
dbname: "%database_name%" | |
user: "%database_user%" | |
password: "%database_password%" | |
charset: UTF8 |
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
listener.user: | |
class: Utilisateurs/UtilisateursBundle/EventListener/UtilisateurCreationListener | |
arguments: [@doctrine] | |
tags: | |
- { name: kernel.event_listener, event: security.interactive_login, method: onAuthenticationSuccess } |
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
<?php | |
use Symfony\Component\HttpFoundation\Response; | |
public function facturesPDFAction($id) | |
{ | |
$em = $this->getDoctrine()->getManager(); | |
$facture = $em->getRepository('EcommerceBundle:Commandes')->findOneBy(array('utilisateur' => $this->getUser(), | |
'valider' => 1, | |
'id' => $id)); |
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
use Symfony\Component\HttpFoundation\Response; | |
public function showFactureAction($id) | |
{ | |
$em = $this->getDoctrine()->getManager(); | |
$facture = $em->getRepository('EcommerceBundle:Commandes')->find($id); | |
if (!$facture) { | |
$this->get('session')->getFlashBag()->add('error', 'Une erreur est survenue'); | |
return $this->redirect($this->generateUrl('adminCommande')); |