Commit 0a8b6efc authored by Mat's avatar Mat
Browse files

init CRUD Légume

parent a92f1337
<?php
namespace PotageBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class LegumeController extends Controller
{
/**
* @param Request
* @return \Symfony\Component\HttpFoundation\Response
*
*/
public function createAction(Request $request)
{
return $this->render('@Potage/Legume/create.html.twig', array());
}
/**
*
* @return \Symfony\Component\HttpFoundation\Response
*
*/
public function readAction()
{
return $this->render('@Potage/Legume/read.html.twig', array());
}
/**
* @param Request
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*/
public function updateAction(Request $request, $id)
{
return $this->render('@Potage/Legume/update.html.twig', array());
}
/**
* @param $id
* @return \Symfony\Component\HttpFoundation\Response
*
*/
public function deleteAction($id)
{
return $this->render('@Potage/Legume/delete.html.twig', array());
}
}
potage_homepage:
path: /
defaults: { _controller: PotageBundle:Default:index }
defaults:
_controller: PotageBundle:Default:index
## CRUD Legume
potage_legume_create:
path: /legume/ajouter
defaults:
_controller: PotageBundle:Legume:create
potage_legume_read:
path: /legumes
defaults:
_controller: PotageBundle:Legume:read
potage_legume_update:
path: /legume/editer/{id}
defaults:
_controller: PotageBundle:Legume:update
potage_legume_delete:
path: /legume/supprimer/{id}
defaults:
_controller: PotageBundle:Legume:delete
{% extends '@Potage/layout.html.twig' %}
{% block title %}
Ajouter un légume
{% endblock %}
{% block content %}
{{ block('breadcrumb') }}
<h1>{{ block('title') }}</h1>
{% endblock %}
{% extends '@Potage/layout.html.twig' %}
{% block title %}
Les légumes
{% endblock %}
{% block content %}
{{ block('breadcrumb') }}
<h1>{{ block('title') }}</h1>
{% endblock %}
{% extends '@Potage/layout.html.twig' %}
{% block title %}
Modifier un légume
{% endblock %}
{% block content %}
{{ block('breadcrumb') }}
<h1>{{ block('title') }}</h1>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment