| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function clear(): ?string |
||
| 27 | { |
||
| 28 | // find trashed rows |
||
| 29 | $records = ContentEntity::onlyTrashed(); |
||
| 30 | |||
| 31 | // init model |
||
| 32 | $model = new FormContentClear($records); |
||
|
|
|||
| 33 | if ($model->send() && $model->validate()) { |
||
| 34 | $model->make(); |
||
| 35 | App::$Session->getFlashBag()->add('success', __('Trash content is cleaned')); |
||
| 36 | $this->response->redirect('content/index'); |
||
| 37 | } |
||
| 38 | |||
| 39 | // draw response |
||
| 40 | return $this->view->render('content/content_clear', [ |
||
| 41 | 'model' => $model |
||
| 42 | ]); |
||
| 45 |