public function UcAddressesAddressBook::__toString in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::__toString()
Returns address book html.
@access public
Return value
string The themed address, as HTML.
File
- class/
UcAddressesAddressBook.class.php, line 762 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
public function __toString() {
$addresses = array();
try {
if (!$this->allLoaded) {
$this
->loadAll();
}
foreach ($this->addresses as $address) {
$addresses[$address
->getId()] = (string) $address;
}
} catch (Exception $e) {
drupal_set_message($e
->getMessage(), 'error');
}
return theme('uc_addresses_address_book', $addresses, $this);
}