public function postContactAction(Request $request)
{
if (!$this->isGranted('CREATE', new JournalContact())) {
throw new AccessDeniedException();
}
try {
$newEntity = $this->container->get('ojs_api.contact.handler')->post($request->request->all());
$routeOptions = array('id' => $newEntity->getId(), '_format' => $request->get('_format'));
return $this->routeRedirectView('api_1_get_contacts', $routeOptions, Codes::HTTP_CREATED);
} catch (InvalidFormException $exception) {
return $exception->getForm();
}
}