| @@ 142-154 (lines=13) @@ | ||
| 139 | * ) |
|
| 140 | * @Delete("/content-providers/menu/settings/{id}", options={"i18n"=false}) |
|
| 141 | */ |
|
| 142 | public function deleteMenuContentProviderSettingsAction($id) |
|
| 143 | { |
|
| 144 | $this->checkPermission(WebcookCmsVoter::ACTION_DELETE); |
|
| 145 | ||
| 146 | $settings = $this->getSettingsById($id); |
|
| 147 | ||
| 148 | $this->getEntityManager()->remove($settings); |
|
| 149 | $this->getEntityManager()->flush(); |
|
| 150 | ||
| 151 | $view = $this->getViewWithMessage(array(), 200, 'Settings has been deleted.'); |
|
| 152 | ||
| 153 | return $this->handleView($view); |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * Return form if is not valid, otherwise process form and return Page object. |
|
| @@ 192-204 (lines=13) @@ | ||
| 189 | * ) |
|
| 190 | * @Delete(options={"i18n"=false}) |
|
| 191 | */ |
|
| 192 | public function deletePageAction($id) |
|
| 193 | { |
|
| 194 | $this->checkPermission(WebcookCmsVoter::ACTION_DELETE); |
|
| 195 | ||
| 196 | $page = $this->getPageById($id); |
|
| 197 | ||
| 198 | $this->getEntityManager()->remove($page); |
|
| 199 | $this->getEntityManager()->flush(); |
|
| 200 | ||
| 201 | $view = $this->getViewWithMessage(array(), 200, 'Page has been deleted.'); |
|
| 202 | ||
| 203 | return $this->handleView($view); |
|
| 204 | } |
|
| 205 | ||
| 206 | /** |
|
| 207 | * Return form if is not valid, otherwise process form and return Page object. |
|