Beispiel #1
0
 /**
  * @param string $action
  *
  * @return mixed
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($action = '')
 {
     return $this->actionHelper->handleDeleteAction($action, function (array $items) {
         $bool = false;
         foreach ($items as $item) {
             $bool = $this->commentRepository->delete($item, 'module_id');
         }
         Core\Cache\Purge::doPurge($this->appPath->getCacheDir() . 'http');
         return $bool;
     });
 }
Beispiel #2
0
 /**
  * @param int $moduleId
  * @param int $resultId
  *
  * @return int
  */
 public function deleteCommentsByModuleAndResult($moduleId, $resultId)
 {
     return $this->commentRepository->delete(['module_id' => $moduleId, 'entry_id' => $resultId]);
 }