You are here

public function UcAddressesAddressBook::deleteAddress in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::deleteAddress()

Deletes an addres by giving the addres object.

Parameters

UcAddressesAddress $address: The address to delete.

Return value

boolean TRUE if the address is deleted. FALSE otherwise.

Throws

UcAddressesDbException

File

class/UcAddressesAddressBook.class.php, line 485
Contains the UcAddressesAddressBook class.

Class

UcAddressesAddressBook
The address book class

Code

public function deleteAddress(UcAddressesAddress $address) {

  // Check to make sure this is one of our addresses
  if ($address
    ->getAddressBook() !== $this) {
    return FALSE;
  }
  return $this
    ->deleteOne(self::BY_AID, $address
    ->getId());
}