Sulu\Bundle\ResourceBundle\Controller\FilterController::cdeleteAction PHP Method

cdeleteAction() public method

Delete an filter with the given id.
public cdeleteAction ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response
    public function cdeleteAction(Request $request)
    {
        $ids = explode(',', $request->get('ids'));
        if ($ids && count($ids) > 0) {
            try {
                $this->getManager()->batchDelete($ids);
                $view = $this->view($ids, 204);
            } catch (FilterNotFoundException $exc) {
                $exception = new EntityNotFoundException($exc->getEntityName(), $exc->getId());
                $view = $this->view($exception->toArray(), 404);
            }
        } else {
            $exception = new InvalidArgumentException(static::$entityName, $ids);
            $view = $this->view($exception->toArray(), 400);
        }
        return $this->handleView($view);
    }