public function companiesAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$search = $this->createForm(new CompanyType(), null, array(
'method' => 'GET'
));
$search->handleRequest($request);
$companies = $em->getRepository('AppBundle:Company')->findAll();
return $this->render('AppBundle::companies.html.twig', [
'companies' => $companies,
'search' => $search->createView()
]);
}
$companies = $em->getRepository('AppBundle:Company')->findAll();