Deletes a rule.

@param int|string $ruleId
@param int $status
199184
public function deleteRule($ruleId, ?int $status = null): void
    {
        $query = $this->connection->createQueryBuilder();
        $query->delete('ngbm_rule')
            ->where(
                $query->expr()->eq('id', ':id')
            )
            ->setParameter('id', $ruleId, Type::INTEGER);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status);
        }

        $query->execute();

        if (!$this->ruleExists($ruleId)) {
            $query = $this->connection->createQueryBuilder();
            $query->delete('ngbm_rule_data')
                ->where(
                    $query->expr()->eq('rule_id', ':rule_id')
                )
                ->setParameter('rule_id', $ruleId, Type::INTEGER);

            $query->execute();
        }
    }
742639
public static function quit($status = 0)
    {
        if (static::enabled()) {
            exit($status);
        }
        if (!is_numeric($status)) {
            throw new QuitException('Exit statement occurred with message: ' . $status, 0);
        }
        throw new QuitException('Exit statement occurred', $status);
    }
654675
public function removePolicyByRoleDraft($roleId, $policyId, Request $request)
    {
        $roleDraft = $this->roleService->loadRoleDraft($roleId);

        $policy = null;
        foreach ($roleDraft->getPolicies() as $rolePolicy) {
            if ($rolePolicy->id == $policyId) {
                $policy = $rolePolicy;
                break;
            }
        }

        if ($policy !== null) {
            $this->roleService->removePolicyByRoleDraft($roleDraft, $policy);

            return new Values\NoContent();
        }

        throw new Exceptions\NotFoundException("Policy not found: '{$request->getPathInfo()}'.");
    }
161117
public function deleteCollectionReferences(array $blockIds, ?int $status = null): void
    {
        $query = $this->connection->createQueryBuilder();

        $query->delete('ngbm_block_collection')
            ->where(
                $query->expr()->in('block_id', [':block_id'])
            )
            ->setParameter('block_id', $blockIds, Connection::PARAM_INT_ARRAY);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status, 'block_status', 'block_status');
        }

        $query->execute();
    }
697486
def delete_command(endpoint_id, rule_id):
    
    client = get_client()

    res = client.delete_endpoint_acl_rule(endpoint_id, rule_id)
    formatted_print(res, text_format=FORMAT_TEXT_RAW, response_key="message")
1249160
public RuleEnvelope deleteRule(String ruleId) throws ApiException {
        ApiResponse<RuleEnvelope> resp = deleteRuleWithHttpInfo(ruleId);
        return resp.getData();
    }
1206088
public function remove($parentId, $id)
    {
        $resource = $this->createPartialResourceUrlForView($parentId, $id);
        $this->client->delete($resource);
    }
524758
public function revokeForId($customerId, $mandateId, $data = [])
    {
        $this->parentId = $customerId;

        return parent::rest_delete($mandateId, $data);
    }
1204728
public function deleteTag($tagId)
    {
        $tagInfo = $this->loadTagInfo($tagId);
        $this->gateway->deleteTag($tagInfo->id);
    }
517353
private function remove_flag_from_message($messageid, $flag) {
        // Get the current mailbox.
        $mailbox = $this->get_mailbox();

        // Mark it as read to lock the message.
        $this->client->store($mailbox, array(
            'ids' => $messageid,
            'delete' => $flag,
        ));
    }
645074
public Request delete(String ruleId) {
        Asserts.assertNotNull(ruleId, "rule id");

        String url = baseUrl
                .newBuilder()
                .addPathSegments("api/v2/rules")
                .addPathSegment(ruleId)
                .build()
                .toString();
        VoidRequest request = new VoidRequest(client, url, "DELETE");
        request.addHeader("Authorization", "Bearer " + apiToken);
        return request;
    }
470319
protected function beforeDelete() {
	
		$acls = Acl::getAllObjects(array('ruleId' => $this->id));
		foreach ($acls as $acl) {
			$acl->delete();
		}
	
	}
196810
public function deleteRule($topicPath, $subscriptionName, $ruleName)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->addStatusCode(Resources::STATUS_OK);
        $httpCallContext->setMethod(Resources::HTTP_DELETE);
        $rulePath = sprintf(
            Resources::RULE_PATH,
            $topicPath,
            $subscriptionName,
            $ruleName
        );
        $httpCallContext->setPath($rulePath);
        $this->sendHttpContext($httpCallContext);
    }
67765
public function deleteZone($layoutId, string $zoneIdentifier, ?int $status = null): void
    {
        $query = $this->connection->createQueryBuilder();
        $query->delete('ngbm_zone')
            ->where(
                $query->expr()->andX(
                    $query->expr()->eq('layout_id', ':layout_id'),
                    $query->expr()->eq('identifier', ':identifier')
                )
            )
            ->setParameter('layout_id', $layoutId, Type::INTEGER)
            ->setParameter('identifier', $zoneIdentifier, Type::STRING);

        if ($status !== null) {
            $this->applyStatusCondition($query, $status);
        }

        $query->execute();
    }
578289
public function loadConditionData($conditionId, int $status): array
    {
        $query = $this->getConditionSelectQuery();
        $query->where(
            $query->expr()->eq('id', ':id')
        )
        ->setParameter('id', $conditionId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
720109
public static function deleteSource($id, $sourceId, $params = null, $opts = null)
    {
        return self::_deleteNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
    }
584776
public function delete($id, $args = [])
    {
        $wpcli_args = buildCLIArgs(
            ['force'],
            $args
        );

        array_unshift($wpcli_args, $id);

        $this->drivers->getDriver()->wpcli('comment', 'delete', $wpcli_args);
    }