Ojs\AdminBundle\Controller\AdminJournalApplicationController::updateAction PHP Метод

updateAction() публичный Метод

public updateAction ( Request $request, $id )
$request Symfony\Component\HttpFoundation\Request
    public function updateAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();
        $entity = $this->getDoctrine()->getRepository('OjsJournalBundle:Journal')->find($id);
        $this->throw404IfNotFound($entity);
        $form = $this->createEditForm($entity);
        $form->handleRequest($request);
        $entity->getCurrentTranslation()->setLocale($entity->getMandatoryLang()->getCode());
        if ($form->isValid()) {
            $em->flush();
            $this->successFlashBag('successful.update');
            return $this->redirectToRoute('ojs_admin_application_journal_edit', ['id' => $id]);
        }
        return $this->render('OjsAdminBundle:AdminApplication:journal_edit.html.twig', ['entity' => $entity, 'form' => $form->createView()]);
    }