public function newIndexesAction() { if (!$this->isGranted('CREATE', new Index())) { throw new AccessDeniedException(); } return $this->createForm(new IndexType(), null, ['csrf_protection' => false]); }