Deletes the resource or the resource list

@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\ResponseInterface Modified response object
176732
public function delete( ServerRequestInterface $request, ResponseInterface $response )
	{
		$view = $this->getView();

		try
		{
			$this->clearCache();

			$status = 200;
			$type = $view->param( 'id', 'default' );
			$view->item = $this->controller->setType( $type )->clear()->get();
		}
		catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
		{
			$status = 409;
			$errors = $this->translatePluginErrorCodes( $e->getErrorCodes() );
			$view->errors = $this->getErrorDetails( $e, 'mshop' ) + $errors;
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$status = 404;
			$view->errors = $this->getErrorDetails( $e, 'mshop' );
		}
		catch( \Exception $e )
		{
			$status = 500;
			$view->errors = $this->getErrorDetails( $e );
		}

		return $this->render( $response, $view, $status );
	}
859019
public function delete(Request $request, Response $response, array $args)
    {
        $entity = $this->em->getRepository($this->entityClass)->find($args['id']);

        if ($entity) {
            $this->em->remove($entity);
            $this->em->flush();
        }

        return new RedirectResponse($this->route);
    }
170255
public function execute(ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface {
		$httpRequestResponse = new HTTPRequestResponseContainer($request, $response);

		$this->dispatchRequestFilters($httpRequestResponse);

		$this->dispatchResponseFilters($httpRequestResponse);

		return $httpRequestResponse->getResponse();
	}
135372
public function doFilter(Request $request, Response $response)
    {
        if ((int) $request->get('error') === 1) {
            return
                $response
                    ->withStatusCode(404)
                    ->write('error')
            ;
        }
    }
1255130
public function unwrapResponse(ResponseInterface $response)
    {
        if ($response->getStatusCode() != 200) {
            throw new ServerNetworkException($response->getStatusCode(), $response->getHeaders(), $response->getBody()->getContents());
        }
        $content = \GuzzleHttp\json_decode($response->getBody()->getContents(), true);
        if (isset($content['ActionStatus']) && $content['ActionStatus'] == 'OK') {
            $this->succeed = true;
            foreach ($content as $name => $value) {
                $setter = 'set' . $name;
                if (method_exists($this, $setter)) {
                    $this->$setter($value);
                } else if (property_exists($this, $name)) {
                    $this->{$name} = $value;
                } else {
                    $this->_content[$name] = $value;
                }
            }
        } else {
            $this->succeed = false;
            if (isset($content['ActionStatus']) && $content['ActionStatus'] == 'FAIL') {
                throw new ServerErrorHttpException($content['ErrorInfo'], $content['ErrorCode']);
            }
        }
    }
1305617
public function categoriesDelete(Request $request, Response $response)
    {
        if ($check = $this->sentinel->hasPerm('blog_categories.delete', 'dashboard', $this->config['blog-enabled'])) {
            return $check;
        }

        $category = BC::find($request->getParam('category_id'));

        if (!$category) {
            $this->flash('danger', 'Category doesn\'t exist.');
            return $this->redirect($response, 'admin-blog');
        }

        if ($category->delete()) {
            $this->flash('success', 'Category has been removed.');
            return $this->redirect($response, 'admin-blog');
        }

        $this->flash('danger', 'There was a problem removing the category.');
        return $this->redirect($response, 'admin-blog');
    }
815057
public function delete($path, array $parameters = [], array $requestHeaders = [])
    {
        $response = $this->getHttpClient()->delete($path, $requestHeaders, $this->createJsonBody($parameters));

        return ResponseMediator::getContent($response);
    }
1020804
public function resolve(Request $request, Response $response)
    {
        return $response->methodNotAllowed(
                $request->method(),
                $this->allowedMethods
        );
    }
338544
public function handle(
        ServerRequestInterface $request, ResponseInterface $response
    )
    {
        $path = array_key_exists(self::QUERY_PARAM, $request->getQueryParams())
            ? $request->getQueryParams()[self::QUERY_PARAM]
            : '';
        $uri = Uri::create($request->getUri());
        $queryString = ltrim(
            str_replace(
                self::QUERY_PARAM."={$path}",
                '',
                $uri->getQuery()
            ),
            '&'
        );
        $uri = $uri->withPath(str_replace('//', '/', "/$path"))
            ->withQuery($queryString);
        /** @var ServerRequestInterface $request */
        $request = $request->withUri($uri);
        return $this->executeNext($request, $response);
    }
1247287
public function execute(ServerRequestInterface $request, ResponseInterface $response)
    {
        try {
            return $this->router->start($request, $response);
        } catch (\Exception $e) {
            $this->logger->warning('Unexpected exception: ' . $e->getMessage());
            $this->logger->debug($e->__toString());

            return $response->withStatus(500)
                ->withBody(new StringStream($e->getMessage()));
        }
    }
368507
public function deleteAction(Request $request)
    {
        $siterootId = $request->get('id');

        $siterootManager = $this->get('phlexible_siteroot.siteroot_manager');

        $siteroot = $siterootManager->find($siterootId);
        $siterootManager->deleteSiteroot($siteroot);

        return new ResultResponse(true, 'Siteroot deleted.');
    }
78063
public function handle(
        ServerRequestInterface $request, ResponseInterface $response
    )
    {
        /** @var Route $route */
        $route = $request->getAttribute('route', false);
        $this->setAttributes($route);
        $class = $this->namespace.'\\'.$this->controller;
        try {
            $controller = $this->createController($class);
            $controller->register($request, $response);

            $this->checkAction($class);

            call_user_func_array([$controller, $this->action], $this->args);
            $request = $controller->getRequest();
            $request = $this->setViewVars($controller, $request);
            $response = $controller->getResponse();
        } catch (ControllerNotFoundException $caught) {
            $this->checkView($request, $caught);
        }

        return $this->executeNext($request, $response);
    }
34596
protected function delete(ServerRequestInterface $request)
    {
        $actor = $request->getAttribute('actor');
        $answer = Answer::find(array_get($request->getQueryParams(), 'id'));

        if ($actor->can('edit.polls') || ($actor->id == Question::find($answer->poll_id)->user_id && $actor->can('selfEditPolls'))) {
            $this->fields->deleteAnswer($answer->id);
        } else {
            throw new PermissionDeniedException();
        }
    }
1108111
protected function errorResponse(ServerRequestInterface $request, ResponseInterface $response)
    {
        if (
            interface_exists(GlobalEnvironmentInterface::class, false) &&
            $response instanceof GlobalEnvironmentInterface &&
            $response->isStale()
        ) {
            $response = $response->revive();
        }

        $errorResponse = $response->withProtocolVersion($request->getProtocolVersion())->withStatus(500);
        $errorResponse->getBody()->write('An unexpected error occured');

        return $errorResponse;
    }
765304
public function deleteResource(string $project, string $resource): ResponseInterface
    {
        return $this->client->sendRequest($this->createRequest('DELETE', $this->createUri("/api/2/project/$project/resource/$resource")));
    }
1368678
public function destroy(Request $request, $id)
    {
        $forceDelete = $request->get('force', false);

        $block = $this->repository->getByIdWithTrashed($id);

        if (!empty($block)) {
            $this->authorize('delete', $block);
            if ($forceDelete) {
                $this->repository->forceDelete($block);
            } else {
                $this->repository->delete($block);
            }
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
15378
public function delete( ServerRequestInterface $request, ResponseInterface $response )
	{
		$view = $this->getView();

		try
		{
			$cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' );

			$view->items = $cntl->cancel( $view->param( 'id' ) );
			$view->total = 1;

			$status = 200;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$status = 403;
			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$status = 404;
			$view->errors = $this->getErrorDetails( $e, 'mshop' );
		}
		catch( \Exception $e )
		{
			$status = 500;
			$view->errors = $this->getErrorDetails( $e );
		}

		return $this->render( $response, $view, $status );
	}