Exemplo n.º 1
0
 /**
  * @Template()
  *
  */
 public function createAllPrevisionSpotAction($id = null)
 {
     $em = $this->container->get('doctrine.orm.entity_manager');
     $spot = $em->find('LaPoizWindBundle:Spot', $id);
     $allPrevWebSite = $em->getRepository('LaPoizWindBundle:WebSite')->findWithName(WebsiteGetData::allPrevName);
     AllPrevGetData::calculateWindAllPrev($allPrevWebSite, $spot, $em);
     $listSpot = $em->getRepository('LaPoizWindBundle:Spot')->findAllValid();
     $listRegion = $em->getRepository('LaPoizWindBundle:Region')->findAllOrderByNumDisplay();
     $listSpotNotValid = $em->getRepository('LaPoizWindBundle:Spot')->findAllNotValid();
     $listSpotsWithoutRegion = $em->getRepository('LaPoizWindBundle:Spot')->findAllWithoutRegion();
     $listWebsites = $em->getRepository('LaPoizWindBundle:WebSite')->findAll();
     return $this->container->get('templating')->renderResponse('LaPoizWindBundle:BackOffice/Tools:calculAllPrevSpot.html.twig', array('spot' => $spot, 'listSpot' => $listSpot, 'listRegion' => $listRegion, 'listSpotNotValid' => $listSpotNotValid, 'listSpotsWithoutRegion' => $listSpotsWithoutRegion, 'listWebsites' => $listWebsites));
 }