public static function UcAddressesAddressBook::newAddress in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::newAddress()
Create a new unowned address.
This method will create an empty address without an owner. This is useful when you want to ask an anonymous user for an address (e.g., when registering). However, unonwed addresses can not be saved. In order to save this address, the UcAddressesAddress method setOwner() should be called.
@access public @static
Return value
UcAddressesAddress A new instance of UcAddressesAddress.
8 calls to UcAddressesAddressBook::newAddress()
- hook_uc_addresses_select_addresses in ./
uc_addresses.api.php - With this hook you can deliver an array of addresses on which the user can select one at checkout or when editing the order, depending on the context $context.
- UcAddressesAddress::newAddress in class/
UcAddressesAddress.class.php - Create a new unowned address.
- UcAddressesApiTestCase::testFieldHandlerApi in tests/
uc_addresses.api.test - Tests field handler with an UcAddressesSchemaAddress.
- UcAddressesCartCheckoutTestCase::doDefaultAddressesTests in tests/
uc_addresses.checkout.test - Checkout with the default addresses.
- UcAddressesTestCase::doAddressValuesDisplayedTests in tests/
UcAddressesTestCase.test - Test if these address values are displayed on the page.
File
- class/
UcAddressesAddressBook.class.php, line 211 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
public static function newAddress() {
return self::get(0)
->addAddress();
}