@@ 61-71 (lines=11) @@ | ||
58 | * |
|
59 | * @return Response |
|
60 | */ |
|
61 | public function newAction(Request $request) |
|
62 | { |
|
63 | $siteSetting = new SiteSetting(); |
|
64 | $form = $this->getForm($siteSetting); |
|
65 | $res = $this->handleUpdate($form, $siteSetting, $request); |
|
66 | if ($res) { |
|
67 | return $res; |
|
68 | } |
|
69 | ||
70 | return $this->updateResponse($siteSetting, $form); |
|
71 | } |
|
72 | ||
73 | /** |
|
74 | * @Method({"GET", "POST"}) |
|
@@ 82-91 (lines=10) @@ | ||
79 | * |
|
80 | * @return Response |
|
81 | */ |
|
82 | public function editAction(SiteSetting $siteSetting, Request $request) |
|
83 | { |
|
84 | $form = $this->getForm($siteSetting); |
|
85 | $res = $this->handleUpdate($form, $siteSetting, $request); |
|
86 | if ($res) { |
|
87 | return $res; |
|
88 | } |
|
89 | ||
90 | return $this->updateResponse($siteSetting, $form); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @param FormInterface $form |