| @@ 128-146 (lines=19) @@ | ||
| 125 | * @Method("PUT") |
|
| 126 | * @Template("AppBundle:Application:edit.html.twig") |
|
| 127 | */ |
|
| 128 | public function updateAction(Settings $settings, Request $request) |
|
| 129 | { |
|
| 130 | $editForm = $this->createForm(new SettingsType(), $settings, array( |
|
| 131 | 'action' => $this->generateUrl('admin_application_update', array('id' => $settings->getId())), |
|
| 132 | 'method' => 'PUT', |
|
| 133 | )); |
|
| 134 | if ($editForm->handleRequest($request)->isValid()) { |
|
| 135 | $this->getDoctrine()->getManager()->flush(); |
|
| 136 | ||
| 137 | return $this->redirectToRoute('admin_application_edit', array('id' => $settings->getId())); |
|
| 138 | } |
|
| 139 | $deleteForm = $this->createDeleteForm($settings->getId(), 'admin_application_delete'); |
|
| 140 | ||
| 141 | return array( |
|
| 142 | 'settings' => $settings, |
|
| 143 | 'edit_form' => $editForm->createView(), |
|
| 144 | 'delete_form' => $deleteForm->createView(), |
|
| 145 | ); |
|
| 146 | } |
|
| 147 | ||
| 148 | /** |
|
| 149 | * Deletes a Settings entity. |
|
| @@ 127-145 (lines=19) @@ | ||
| 124 | * @Method("PUT") |
|
| 125 | * @Template("AppBundle:Company:edit.html.twig") |
|
| 126 | */ |
|
| 127 | public function updateAction(Company $company, Request $request) |
|
| 128 | { |
|
| 129 | $editForm = $this->createForm(new CompanyType(), $company, array( |
|
| 130 | 'action' => $this->generateUrl('admin_company_update', array('id' => $company->getId())), |
|
| 131 | 'method' => 'PUT', |
|
| 132 | )); |
|
| 133 | if ($editForm->handleRequest($request)->isValid()) { |
|
| 134 | $this->getDoctrine()->getManager()->flush(); |
|
| 135 | ||
| 136 | return $this->redirectToRoute('admin_company_show', array('id' => $company->getId())); |
|
| 137 | } |
|
| 138 | $deleteForm = $this->createDeleteForm($company->getId(), 'admin_company_delete'); |
|
| 139 | ||
| 140 | return array( |
|
| 141 | 'company' => $company, |
|
| 142 | 'edit_form' => $editForm->createView(), |
|
| 143 | 'delete_form' => $deleteForm->createView(), |
|
| 144 | ); |
|
| 145 | } |
|
| 146 | ||
| 147 | /** |
|
| 148 | * Deletes a Company entity. |
|
| @@ 138-159 (lines=22) @@ | ||
| 135 | * @Method("PUT") |
|
| 136 | * @Template("AppBundle:FamilyLog:edit.html.twig") |
|
| 137 | */ |
|
| 138 | public function updateAction(FamilyLog $famlog, Request $request) |
|
| 139 | { |
|
| 140 | $editForm = $this->createForm(new FamilyLogType(), $famlog, array( |
|
| 141 | 'action' => $this->generateUrl( |
|
| 142 | 'admin_familylog_update', |
|
| 143 | array('slug' => $famlog->getSlug()) |
|
| 144 | ), |
|
| 145 | 'method' => 'PUT', |
|
| 146 | )); |
|
| 147 | if ($editForm->handleRequest($request)->isValid()) { |
|
| 148 | $this->getDoctrine()->getManager()->flush(); |
|
| 149 | ||
| 150 | return $this->redirectToRoute('admin_familylog_edit', array('slug' => $famlog->getSlug())); |
|
| 151 | } |
|
| 152 | $deleteForm = $this->createDeleteForm($famlog->getId(), 'admin_familylog_delete'); |
|
| 153 | ||
| 154 | return array( |
|
| 155 | 'familylog' => $famlog, |
|
| 156 | 'edit_form' => $editForm->createView(), |
|
| 157 | 'delete_form' => $deleteForm->createView(), |
|
| 158 | ); |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * Deletes a FamilyLog entity. |
|
| @@ 137-158 (lines=22) @@ | ||
| 134 | * @Method("PUT") |
|
| 135 | * @Template("AppBundle:SubFamilyLog:edit.html.twig") |
|
| 136 | */ |
|
| 137 | public function updateAction(SubFamilyLog $subfamilylog, Request $request) |
|
| 138 | { |
|
| 139 | $editForm = $this->createForm(new SubFamilyLogType(), $subfamilylog, array( |
|
| 140 | 'action' => $this->generateUrl( |
|
| 141 | 'admin_subfamilylog_update', |
|
| 142 | array('slug' => $subfamilylog->getSlug()) |
|
| 143 | ), |
|
| 144 | 'method' => 'PUT', |
|
| 145 | )); |
|
| 146 | if ($editForm->handleRequest($request)->isValid()) { |
|
| 147 | $this->getDoctrine()->getManager()->flush(); |
|
| 148 | ||
| 149 | return $this->redirectToRoute('admin_subfamilylog_edit', array('slug' => $subfamilylog->getSlug())); |
|
| 150 | } |
|
| 151 | $deleteForm = $this->createDeleteForm($subfamilylog->getId(), 'admin_subfamilylog_delete'); |
|
| 152 | ||
| 153 | return array( |
|
| 154 | 'subfamilylog' => $subfamilylog, |
|
| 155 | 'edit_form' => $editForm->createView(), |
|
| 156 | 'delete_form' => $deleteForm->createView(), |
|
| 157 | ); |
|
| 158 | } |
|
| 159 | ||
| 160 | ||
| 161 | /** |
|