public function UcAddressesAddressBook::__toString in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 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 763 - 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', array(
'addresses' => $addresses,
'address_book' => $this,
));
}