Elcodi\Admin\PageBundle\Controller\PageController::editAction PHP Метод

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

Edit and Saves page
public editAction ( Symfony\Component\Form\FormInterface $form, Elcodi\Component\Page\Entity\Interfaces\PageInterface $page, boolean $isValid ) : RedirectResponse
$form Symfony\Component\Form\FormInterface Form
$page Elcodi\Component\Page\Entity\Interfaces\PageInterface Page
$isValid boolean Is valid
Результат Symfony\Component\HttpFoundation\RedirectResponse Redirect response
    public function editAction(FormInterface $form, PageInterface $page, $isValid)
    {
        if ($isValid) {
            $this->flush($page);
            $this->addFlash('success', $this->get('translator')->trans('admin.page.saved'));
            return $this->redirectToRoute('admin_page_list');
        }
        return ['page' => $page, 'form' => $form->createView()];
    }