mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
poc form SDK (extends to form)
This commit is contained in:
34
sources/DI/Controller/ConfigurationController.php
Normal file
34
sources/DI/Controller/ConfigurationController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\DI\Controller;
|
||||
|
||||
use Combodo\iTop\DI\Form\Type\Compound\ConfigurationType;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* Configuration controller.
|
||||
*
|
||||
*/
|
||||
class ConfigurationController extends AbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
* @Route("/configuration/edit", name="configuration_edit")
|
||||
*/
|
||||
public function configurationEdit(Request $request) : Response
|
||||
{
|
||||
// create object form
|
||||
$oForm = $this->createForm(ConfigurationType::class, []);
|
||||
|
||||
// handle HTTP request
|
||||
$oForm->handleRequest($request);
|
||||
|
||||
// return object form
|
||||
return $this->renderForm('DI/configuration/edit.html.twig', [
|
||||
'form' => $oForm
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user