LeafletController.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace LeafletBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  4. use Symfony\Component\Workflow\Exception\ExceptionInterface;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Sonata\AdminBundle\Admin\Pool;
  8. class LeafletController extends Controller
  9. {
  10. public function createVectorAction(Request $request)
  11. {
  12. $adminPool = $this->get('sonata.admin.pool');
  13. $uid = time();
  14. return $this->render('LeafletBundle:Leaflet:create_vector.html.twig', array(
  15. 'base_template' => $adminPool->getTemplate('layout'),
  16. 'admin_pool' => $adminPool,
  17. 'admin' => $adminPool->getAdminByClass("MapBundle\Entity\Map"),
  18. 'uid' => $uid
  19. ));
  20. }
  21. public function saveVectorAction(Request $request)
  22. {
  23. print_r($request->request->all());
  24. die;
  25. // $adminPool = $this->get('sonata.admin.pool');
  26. // $uid = time();
  27. // return $this->render('LeafletBundle:Leaflet:create_vector.html.twig', array(
  28. // 'base_template' => $adminPool->getTemplate('layout'),
  29. // 'admin_pool' => $adminPool,
  30. // 'admin' => $adminPool->getAdminByClass("MapBundle\Entity\Map"),
  31. // 'uid' => $uid
  32. // ));
  33. }
  34. }