%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/emtnaeewxm/www/src/EEM/ParametreBundle/Controller/
Upload File :
Create Path :
Current File : /home/emtnaeewxm/www/src/EEM/ParametreBundle/Controller/ParametreController.php

<?php

namespace EEM\ParametreBundle\Controller;

use EEM\ParametreBundle\Entity\Parametre;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;

/**
 * Parametre controller.
 *
 * @Route("/admin/parametre")
 */
class ParametreController extends Controller
{



    /**
     * Displays a form to edit an existing parametre entity.
     *
     * @Route("/{id}/edit", name="parametre_edit")
     * @Method({"GET", "POST"})
     * @Security("has_role('ROLE_USER')")
     */
    public function editAction(Request $request, Parametre $parametre)
    {
        $editForm = $this->createForm('EEM\ParametreBundle\Form\ParametreType', $parametre);
        $editForm->handleRequest($request);

        if ($editForm->isSubmitted() && $editForm->isValid()) {
            $this->getDoctrine()->getManager()->flush();

            return $this->redirectToRoute('parametre_edit', array('id' => $parametre->getId()));
        }

        return $this->render('@EEMParametre/parametre/edit.html.twig', array(
            'parametre' => $parametre,
            'edit_form' => $editForm->createView(),
        ));
    }

}

Zerion Mini Shell 1.0