TYPO3 CMS  TYPO3_8-7
ToolsController.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
18 
23 {
30  public function deleteMessageAction(int $errorUid)
31  {
33  $logEntry = $this->logEntryRepository->findByUid($errorUid);
34  if (!$logEntry) {
35  $this->addFlashMessage(LocalizationUtility::translate('actions.delete.noRowFound', 'belog'), '', AbstractMessage::WARNING);
36  $this->redirect('index');
37  }
38  $numberOfDeletedRows = $this->logEntryRepository->deleteByMessageDetails($logEntry);
39  $this->addFlashMessage(sprintf(LocalizationUtility::translate('actions.delete.message', 'belog'), $numberOfDeletedRows));
40  $this->redirect('index');
41  }
42 }
static translate($key, $extensionName=null, $arguments=null)
redirect($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
addFlashMessage($messageBody, $messageTitle='', $severity=\TYPO3\CMS\Core\Messaging\AbstractMessage::OK, $storeInSession=true)