Delete one or more leads

@param int|array $leads  Either a single lead ID or an array of lead IDs
@param array     $args

@link http://developers.marketo.com/documentation/rest/delete-lead/

@return DeleteLeadResponse
339237
public function deleteLead($leads, $args = array(), $returnRaw = false)
    {
        $args['id'] = (array) $leads;

        return $this->getResult('deleteLead', $args, true, $returnRaw);
    }
466622
public function podiumDeletePosts($posts)
    {
        $transaction = static::getDb()->beginTransaction();
        try {
            foreach ($posts as $post) {
                if (!is_numeric($post) || $post < 1) {
                    throw new Exception('Incorrect post ID');
                }
                $nPost = Post::find()
                            ->where([
                                'id' => $post,
                                'thread_id' => $this->id,
                                'forum_id' => $this->forum->id
                            ])
                            ->limit(1)
                            ->one();
                if (!$nPost) {
                    throw new Exception('No post of given ID found');
                }
                if (!$nPost->delete()) {
                    throw new Exception('Post deleting error!');
                }
            }
            $wholeThread = false;
            if ($this->postsCount) {
                $this->updateCounters(['posts' => -count($posts)]);
                $this->forum->updateCounters(['posts' => -count($posts)]);
            } else {
                $wholeThread = true;
                if (!$this->delete()) {
                    throw new Exception('Thread deleting error!');
                }
                $this->forum->updateCounters(['posts' => -count($posts), 'threads' => -1]);
            }
            $transaction->commit();
            PodiumCache::clearAfter('postDelete');
            Log::info('Posts deleted', null, __METHOD__);
            return true;
        } catch (Exception $e) {
            $transaction->rollBack();
            Log::error($e->getMessage(), null, __METHOD__);
        }
        return false;
    }
1302968
public function deleteTable($meta, ...$args)
    {
        if (!isset($args[0])) {
            throw new \InvalidArgumentException("Cannot delete from table without a condition (pass the string '1=1' if you really meant to do this)");
        }
        $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;
        if (!$meta->canDelete) {
            throw new Exception("Meta {$meta->id} prohibits update");
        }
        $query = Query\Criteria::fromParamArgs($args);
        return $this->executeDelete($meta, $query); 
    }
1332580
public function dbgDelete(array $tables=[]) {
		$sql = $this->buildDeleteSQL($tables);
		$params = $this->getParameters();

		return $this->replaceParams($sql, $params);
	}
956383
public function delete( $args, $assoc_args ) {
		list( $id ) = $args;

		$assoc_args = wp_parse_args( $assoc_args, array(
			'delete_blogs' => false,
		) );

		$network_id = delete_network( $id, $assoc_args['delete_blogs'] );

		if ( is_wp_error( $network_id ) ) {
			WP_CLI::error( $network_id );
		}

		WP_CLI::success( sprintf( 'Deleted network %d.', $id ) );
	}
1345065
public function delete(string $pattern, $callback, array $requirements = [])
    {
        return $this->match($pattern, $callback, $requirements, [Request::METHOD_DELETE]);
    }
728375
public function deleteUser(int $user_id, array $args = [])
    {
        $this->getDriver()->user->delete($user_id, $args);
    }
539834
public function confirmDeleteCollection($args)
    {
        // Get dependencies
        $collectionMapper = ($this->container->dataMapper)('CollectionMapper');
        $pageMapper = ($this->container->dataMapper)('PageMapper');

        $data = $collectionMapper->findById($args['id']);
        $data->pages = $pageMapper->findCollectionPagesById($args['id'], false);

        return $this->render('confirmDeleteCollection.html', $data);
    }
280729
public function handleDelete(Args $args)
    {
        $typeName = $args->getArgument('name');

        if (!$this->discoveryManager->hasRootTypeDescriptor($typeName)) {
            throw new RuntimeException(sprintf(
                'The type "%s" does not exist in the module "%s".',
                $typeName,
                $this->modules->getRootModuleName()
            ));
        }

        $this->discoveryManager->removeRootTypeDescriptor($typeName);

        return 0;
    }
198086
public function bootstrapRowButtonDeleteFunction(array $args = []) {

        $txt = $this->getTranslator()->trans("label.delete", [], "WBWBootstrapBundle");
        $but = $this->getButtonTwigExtension()->bootstrapButtonDangerFunction(["title" => $txt, "icon" => "g:trash"]);

        return $this->getButtonTwigExtension()->bootstrapButtonLinkFilter($but, ArrayHelper::get($args, "href", self::DEFAULT_HREF));
    }
559118
public function removeLead($labelId, $leadId)
    {
        $response = giga_facebook_delete($labelId . '/label', [
            'user' => $leadId
        ]);

        return isset($response->success);
    }
182669
public function _delete(...$keyValues) {
		$instance = DAO::getOne ( $this->model, $keyValues, false );
		$this->operate_ ( $instance, function ($instance) {
			return DAO::remove ( $instance );
		}, "deleted", "Unable to delete the instance", $keyValues );
	}
38523
public function deleteOAuthProvider($params)
    {
        if (is_string($params)) {
            $params = array('provider_consumer_key' => $params);
        } else {
            $params = $this->checkFilterParams($params, array('provider_consumer_key'), array('provider_consumer_key'));
            if ($params === false) {
                throw new \InvalidArgumentException("params array contains invalid parameters or misses required parameters");
            }
        }

        return $this->lastRequest->delete(null, 'oauth_providers/' . $params[ 'provider_consumer_key' ]);
    }
1279133
public function postRemove(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->postRemove($args->getObject());
        }
    }
774314
public function deleteBatch(array $ids)
    {
        $supported = $this->isSupported('deleteBatch');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/batch/delete', array('ids' => $ids), 'DELETE') : $supported;
    }
1039384
public function addLead(Lead $lead): Lead
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use create() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->create($lead);
    }
1086359
public function deleteRoles(array $ids): void
	{
		if ($this->isAjax()) {
			$roles = $this->orm->aclRoles->findById($ids);
			foreach ($roles as $role) {
				$this->orm->aclRoles->remove($role);
			}
			$this->orm->flush();
			$this['permissionsList']->reload();
		} else {
			$this->terminate();
		}
	}