You are here

function hook_uc_addresses_address_load in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 uc_addresses.api.php \hook_uc_addresses_address_load()

This hook allows you to act on addresses being loaded from the database.

Parameters

UcAddressesAddress $address: The address object.

object $obj: The fetched database record.

Return value

void

2 invocations of hook_uc_addresses_address_load()
UcAddressesAddressBook::dbResultToAddresses in class/UcAddressesAddressBook.class.php
Creates UcAddressesAddress objects from a database resource.
UcAddressesAddressBook::loadStatic in class/UcAddressesAddressBook.class.php
Loads a single address from the database if not already loaded.

File

./uc_addresses.api.php, line 202
These hooks are invoked by the Ubercart Addresses module. @todo more documentation needed for hook_uc_addresses_field_handlers(). @todo Document the rest of the API.

Code

function hook_uc_addresses_address_load($address, $obj) {

  // Example: set a value for my custom added field (through hook_uc_addresses_fields()).
  $address
    ->setField('myfield', 'myvalue');
}