public function newAction(Request $request)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
if (!$this->isGranted('CREATE', $journal, 'posts')) {
throw new AccessDeniedException("You are not authorized for this post!");
}
$entity = new JournalPost();
$entity->setCurrentLocale($request->getDefaultLocale());
$form = $this->createCreateForm($entity);
return $this->render('OjsJournalBundle:JournalPost:new.html.twig', ['entity' => $entity, 'form' => $form->createView()]);
}