private function processForm(JournalTheme $entity, array $parameters, $method = "PUT")
{
$form = $this->formFactory->create(new JournalThemeType(), $entity, array('method' => $method, 'csrf_protection' => false));
$form->submit($parameters, 'PATCH' !== $method);
$formData = $form->getData();
if ($form->isValid()) {
$entity->setCurrentLocale('en');
$entity->setJournal($this->journalService->getSelectedJournal());
$this->om->persist($entity);
$this->om->flush();
return $formData;
}
throw new InvalidFormException('Invalid submitted data', $form);
}