Deletes the tag with the given ID.

@param $id

@return Response
348936
public function deleteAction($id)
    {
        $delete = function($id) {
            try {
                $this->getManager()->delete($id);
            } catch (TagNotFoundException $tnfe) {
                throw new EntityNotFoundException(self::$entityName, $id);
            }
        };

        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
939031
private function deleteById($id)
    {
        $builder = $this->repository->createQueryBuilder();
        $builder
            ->remove()
            ->field('id')->equals($id)
            ->getQuery()
            ->execute();
    }
1032404
public function destroy($id)
    {
        try {
            $file = $this->fileDB->getById($id);
            $this->fileDB->deleteFile($file);
            return 'File deleted';
        } catch (\Exception $e) {
            \Log::error($e);
            $this->flashMessage('delete-failed','danger');
            return 'Error: File not deleted';
        }
    }
809512
public function delete(int $id)
    {
        return self::$curl->post(self::DELETE.self::$access_token, json_encode([
                'tag' => [
                    'id' => $id,
                ],
            ]
        ));
    }
568690
public function delete($id)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->delete();
    }
1216058
public function delete($id)
    {
        $response = $this->restClient->delete($this->endpoint . '/' . $id);

        return $response['body'];
    }
766600
public function remove($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		return $this->getClient()->delete($this->prepareId($id));
	}
928301
public function delete($id)
    {
        return $this->model->where($this->model->getKeyName(), $id)->delete();
    }
549487
public function delete(string $id)
    {
        $this->request->allowMethod(['post', 'delete']);
        $group = $this->Groups->get($id);
        if ($this->Groups->delete($group)) {
            $this->Flash->success((string)__('The group has been deleted.'));
        } else {
            $this->Flash->error((string)__('The group could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
475921
protected function deleteRequest($id)
    {
        $query = "DELETE FROM {$this->config->table_requests} WHERE id = :id";
        $query_prepared = $this->dbh->prepare($query);
        return $query_prepared->execute(['id' => $id]);
    }
1059665
public function deleteById($id = '')
    {
        $node = $this->mainNode->getById($id);

        if (empty($node)) {
            true;
        }

        return $node->delete();
    }
1224810
public function deleteById($id)
    {
        try {
            $obj = $this->getById($id);
            $this->delete($obj);
            return true;
        } catch (\Exception $e) {
            throw $e;
        }
    }
1320093
public function destroy($id)
    {
        try {
            $wasSuccessful = $this->repository->delete($id);
            return Response::apiResponse([
                'data' => $wasSuccessful
            ]);
        } catch (\Exception $e) {
            return Response::apiResponse([
                'httpCode' => 400,
                'message' => $e->getMessage()
            ]);
        }
    }
591118
public function destroy($id)
    {
        $this->model->findOrFail($id)->delete();

        $this->notify([
            'type' => 'danger',
            'title' => 'Successful deleted Role!',
            'description' => 'The role is deleted successfully.',
        ]);

        return redirect()->back();
    }
225375
public function delete($id) {
        return $this->request("DELETE", self::URL_PLANS . $id . "/", $api_key = $this->culqi->api_key);
    }
1260455
public function delete($id)
    {
        $tag = $this->tagRepository->findTagById($id);

        if (!$tag) {
            throw new TagNotFoundException($id);
        }

        $this->em->remove($tag);
        $this->em->flush();

        // throw an tag.delete event
        $event = new TagDeleteEvent($tag);
        $this->eventDispatcher->dispatch(TagEvents::TAG_DELETE, $event);
    }
1373605
public function remove($id)
    {
        try {
            Storage::delete($id);
            $response = $this->responseService->apiResponse('success', 'success!');
        } catch (Exception $e) {
            $response = $this->responseService->apiResponse('error', $e->getMessage());
        }

        return $response;
    }