public function indexAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$systemSetting = $em->getRepository('OjsAdminBundle:SystemSetting')->findOneBy([]);
if (!$systemSetting) {
$systemSetting = $this->createSystemSetting();
}
$form = $this->createForm(new SystemSettingsType(), $systemSetting);
$form->handleRequest($request);
if ($form->isValid() && $request->getMethod() == 'POST') {
$em->persist($systemSetting);
$em->flush();
$this->successFlashBag('successful.update');
}
return $this->render('OjsAdminBundle:AdminSystemSetting:index.html.twig', array('entity' => $systemSetting, 'form' => $form->createView()));
}