LeafletController.php 752 B

123456789101112131415161718192021222324252627
  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. return $this->render('LeafletBundle:Leaflet:create_vector.html.twig', array(
  14. 'base_template' => $adminPool->getTemplate('layout'),
  15. 'admin_pool' => $adminPool,
  16. 'admin' => $adminPool->getAdminByClass("MapBundle\Entity\Map")
  17. ));
  18. }
  19. }