Sonata Admin - Custom AJAX call
问题 I have created a custom list view in sonata admin to display a calendar. I'm trying to add events to the calendar dynamically, but I'm getting an error with the CSRF token being invalid. I have the following code: public function listAction() { if (false === $this->admin->isGranted('LIST')) { throw new AccessDeniedException(); } $datagrid = $this->admin->getDatagrid(); $formView = $datagrid->getForm()->createView(); // set the theme for the current Admin Form $this->get('twig')->getExtension(