getEntityManager(); $site = $this->getSiteContainer()->getStore()->getOneByDevAlias('default') ; $form = $this->createForm(SiteSettingsFormType::class, $site); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $entityManager->update($site); $entityManager->flush(); $this->addFlash('success', $this->getTranslatorAdmin()->transFlashMessage('settings_saved')); } return $this->render( '@LcSov/admin/setting/edit_site.html.twig' , [ 'setting_definition' => $this->get(SiteSettingContainer::class)->getDefinition(), 'form' => $form->createView() ] ); } }