<?php
namespace App\Controller;
use App\Form\SearchFormType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class MainController extends AbstractController
{
/**
* @Route("/", name="main")
*/
public function index()
{
return $this->render('main/index.html.twig', [
'controller_name' => 'MainController',
]);
}
public function getSearchForm($request){
$form = $this->createForm(SearchFormType::class, ($request['search_form'] ?? null));
return $this->render('bundles/KnpPaginator/filter.html.twig', [
'form' => $form->createView(),
]);
}
}