Removes a contact.

@param Contact $contact
480862
public function deleteContact(Contact $contact)
    {
        $this->om->remove($contact);
        $this->om->flush();
    }
683834
public function deleteAddressBookContact($addressBookId, $contactId)
    {
        //Only if there is a contact id and address book id
        if ($addressBookId && $contactId) {
            $url = $this->getApiEndpoint() . self::REST_ADDRESS_BOOKS . $addressBookId
                . '/contacts/' . $contactId;
            $this->setUrl($url)
                ->setVerb('DELETE');
            $this->execute();
            $this->helper->log(sprintf('Delete-contact %s from addressbook %s', $contactId, $addressBookId));
        }
    }
1111208
public function validContact(string $contact): bool
    {
        return filter_var($contact, FILTER_VALIDATE_EMAIL) !== false ||
               filter_var($contact, FILTER_VALIDATE_URL) !== false;
    }
578747
public function deleteFromId( $ContactEntryId){
        $rest = $this->getService( self::API_CONTACT);
        $rest->DELETE( $ContactEntryId);

        return $rest->getSuccess();
    }
1253865
public function hasContacts(array $contacts): bool
    {
        foreach ($contacts as $contact) {
            if (!$this->hasContact($contact)) {
                return false;
            }
        }

        return true;
    }
22861
def cancel(self, contacts):
        
        self.is_in_effect = False
        contact = contacts[self.ref]
        contact.raise_cancel_downtime_log_entry()
        self.can_be_deleted = True
476519
public function setContact(\WobbleCode\UserBundle\Document\Contact $contact)
    {
        $this->contact = $contact;

        return $this;
    }
1359088
public void setContacts(java.util.Collection<ContactData> contacts) {
        if (contacts == null) {
            this.contacts = null;
            return;
        }

        this.contacts = new java.util.ArrayList<ContactData>(contacts);
    }
3431
public function deleteContact(Contact $contact)
    {
        if ($this !== $contact->contactable()->first())
            return false;

        return $contact->delete();
    }
836915
public function setMainAccount(Contact $contact, $data)
    {
        // set account relation
        if (isset($data['account']) &&
            isset($data['account']['id']) &&
            'null' != $data['account']['id']
        ) {
            $accountId = $data['account']['id'];

            $account = $this->accountRepository->findAccountById($accountId);

            if (!$account) {
                throw new EntityNotFoundException($this->accountRepository->getClassName(), $accountId);
            }

            // get position
            $position = null;
            if (isset($data['position'])) {
                $position = $this->getPosition($data['position']);
            }

            // check if relation between account and contact already exists
            $mainAccountContact = $this->getMainAccountContact($contact);
            $accountContact = $this->getAccounContact($account, $contact);

            // remove previous main accountContact
            if ($mainAccountContact && $mainAccountContact !== $accountContact) {
                // if this contact is the main-Contact - set mainContact to null
                if ($mainAccountContact->getAccount()->getMainContact() === $contact) {
                    $mainAccountContact->getAccount()->setMainContact(null);
                }
                $this->em->remove($mainAccountContact);
            }

            // if account-contact relation existed set params
            if ($accountContact) {
                $accountContact->setMain(true);
                $accountContact->setPosition($position);
            } else {
                // else create new one
                $this->createMainAccountContact($contact, $account, $position);
            }
        } else {
            // if a main account exists - remove it
            if ($accountContact = $this->getMainAccountContact($contact)) {
                // if this contact is the main-Contact - set mainContact to null
                if ($accountContact->getAccount()->getMainContact() === $contact) {
                    $accountContact->getAccount()->setMainContact(null);
                }

                $this->em->remove($accountContact);
            }
        }
    }
751666
public function deleteNote(Note $note, Contact $contact)
    {
        $this->connector->delete($note, $contact);
        return $this;
    }
338670
public function destroy(Contact $contact)
    {
        $contact->delete();

        return intend([
            'url' => route('managerarea.contacts.index'),
            'with' => ['warning' => trans('cortex/foundation::messages.resource_deleted', ['resource' => trans('cortex/contacts::common.contact'), 'identifier' => $contact->full_name])],
        ]);
    }
198467
def delete_contact(self, contact_id):
        
        url = self.CONTACTS_ID_URL % contact_id

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.delete_request()
62842
public function addContacts($contacts)
    {
        if (!is_array($contacts)) {
            return false;
        }
        foreach ($contacts as $contact) {
            if (!($contact  instanceof contact)) {
                return false;
            }
        }
        $this->contacts = array_merge($this->contacts, $contacts);

        return true;
    }
1010130
public function deleteContact(string $id, array $data, array $headers = [])
    {
        $url = $this->url('customers/%s/delete_contact', $id);

        return $this->post($url, $data, $headers);
    }
611239
public function delete($listId, Contact $contact)
    {
        $contact->setAction(Contact::ACTION_REMOVE);
        $response = $this->_exec($listId, $contact);
        if (!$response->success()) {
            $this->throwError("ContactsListService:delete() failed", $response);
        }

        return $response->getData();
    }
88612
public function delete($id)
    {
        if ($this->_mails && isset($this->_mails[$id])) {
            $this->_mails[$id]['is_deleted'] = true;
        }
    }