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