You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
968 B
PHP
39 lines
968 B
PHP
<?php
|
|
namespace App\Controller;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
|
|
|
Class PadController extends AbstractController
|
|
{
|
|
public function showForm(){
|
|
|
|
$form = $this->createFormBuilder()
|
|
->add('content', TextareaType::class)
|
|
->add('save', SubmitType::class, ['label' => 'Enregistrer'])
|
|
->setAction($this->generateUrl('api_post_new'))
|
|
->getForm();
|
|
|
|
|
|
return $this->render('pad.html.twig', [
|
|
'head_title' => 'Créer un nouveau PAD',
|
|
'page_title' => 'Simple Pad',
|
|
'form' => $form->createView()
|
|
]);
|
|
}
|
|
public function view($id)
|
|
{
|
|
return new Response(
|
|
'<h1>plop</h1>'
|
|
);
|
|
}
|
|
|
|
public function post()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
} |