Remove emails.

@param \Sulu\Bundle\ContactBundle\Entity\Email $emails
434161
public function removeEmail(\Sulu\Bundle\ContactBundle\Entity\Email $emails)
    {
        $this->emails->removeElement($emails);
    }
923225
public function delete(Contact $contact): void
    {
        $id = $contact->getId();

        $contact->setId(null);

        $this->client->delete($this->prepareUrlForKey('delete-contact', ['id' => $id]));
    }
877001
public function removeArticle($article)
    {
        if ($this->articles->contains($article)) {
            $this->articles->remove($article);
        }
    }
554597
public function remove(Folder $entity)
    {
        $this->em->remove($entity);
        $this->em->flush();
    }
869368
public function removeOrganization($organization)
    {
        $this->hasOrganizationsProperty();

        if ($this->organizations->contains($organization)) {
            $this->organizations->removeElement($organization);
        }
    }
221385
public function removeSentMail(\KRS\MailBundle\Entity\SentMail $sentMail)
    {
        $this->sentMail->removeElement($sentMail);
    }
676290
public function setEmail($email)
    {
        if (!is_string($email)) {
            $email = strval($email);
        }

        $this->email = $email;
    }
687750
public function detach($entity)
    {
        $this->entityRegistry->deregisterEntity($entity);
        $objectHashId = $this->entityRegistry->getObjectHashId($entity);
        unset($this->scheduledForInsertion[$objectHashId]);
        unset($this->scheduledForUpdate[$objectHashId]);
        unset($this->scheduledForDeletion[$objectHashId]);
    }
117168
public function thereAreNoUsersWithTheEmail($email)
    {
        $users = $this->getRepository()->getUserService()->loadUsersByEmail($email);
        Assertion::assertEquals(0, count($users), "Users with the email '$email' exist");
    }
982559
public function removePhone(\Sulu\Bundle\ContactBundle\Entity\Phone $phones)
    {
        $this->phones->removeElement($phones);
    }
895757
public function removeContact(int $index): void
    {
        unset($this->contacts[$index]);
        $this->contacts = array_values($this->contacts);
    }
316265
public function delete($entity)
    {
        $query = $this->db->table($entity->definition()->getName());
        $primary = $entity->id();
        if (isset($this->objects[$entity->definition()->getName()][base64_encode(serialize($primary))])) {
            foreach ($primary as $k => $v) {
                $query->filter($k, $v);
            }
            $query->delete();
            unset($this->objects[$entity->definition()->getName()][base64_encode(serialize($primary))]);
        }
    }
536113
public function deleteEmail( $email_id = null ) {
		if ( ! $email_id ) {
			$this->assertNotEmpty( $this->_current_email, 'The current email is not selected' );
			$email_id = $this->_current_email['id'];
		}

		$this->_send_delete_request( '/messages/' . $email_id );
	}
366375
public function remove($id)
    {
        if ($this->has($id) === false) {
            return;
        }

        $collection = $this->idCollections[$id];

        unset($this->idCollections[$id]);
        unset($this->itemCollections[$collection]);
        unset($this->items[$id]);
    }
57700
public function remove($id): void
    {
        $model = $this->repository->get($id);
        $this->repository->remove($model);
    }
116898
public function deleteConsentByEmails($emails)
    {
        if (empty($emails)) {
            return [];
        }
        $collection = $this->consentCollectionFactory->create();
        $collection->getSelect()
            ->joinInner(
                ['c' => $this->getTable(Schema::EMAIL_CONTACT_TABLE)],
                "c.email_contact_id = main_table.email_contact_id",
                []
            );

        $collection->addFieldToFilter('c.email', ['in' => $emails]);

        return $collection->walk('delete');
    }
749055
public function unsubscribe($emails)
    {
        if (! empty($emails) && is_array($emails)) {
            $write = $this->getConnection();

            //un-subscribe from the email contact table.
            $updated = $write->update(
                $this->getMainTable(),
                [
                    'is_subscriber' => $this->expressionFactory->create(["expression" => 'null']),
                    'subscriber_status' => \Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED,
                    'suppressed' => '1',
                ],
                ["email IN (?)" => $emails]
            );

            // un-subscribe newsletter subscribers
            $write->update(
                $this->getTable('newsletter_subscriber'),
                ['subscriber_status' => \Magento\Newsletter\Model\Subscriber::STATUS_UNSUBSCRIBED],
                ["subscriber_email IN (?)" => $emails]
            );

            return $updated;
        }

        return 0;
    }