Mage_Customer_Block_Address_Book Class Reference

Inheritance diagram for Mage_Customer_Block_Address_Book:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getAddAddressUrl ()
 getBackUrl ()
 getDeleteUrl ()
 getAddressEditUrl ($address)
 getPrimaryBillingAddress ()
 getPrimaryShippingAddress ()
 hasPrimaryAddress ()
 getAdditionalAddresses ()
 getAddressHtml ($address)
 getCustomer ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Definition at line 34 of file Book.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 36 of file Book.php.

00037     {
00038         $this->getLayout()->getBlock('head')
00039             ->setTitle(Mage::helper('customer')->__('Address Book'));
00040 
00041         return parent::_prepareLayout();
00042     }

getAddAddressUrl (  ) 

Definition at line 44 of file Book.php.

00045     {
00046         return $this->getUrl('customer/address/new', array('_secure'=>true));
00047     }

getAdditionalAddresses (  ) 

Definition at line 82 of file Book.php.

00083     {
00084         $addresses = $this->getCustomer()->getAdditionalAddresses();
00085         return empty($addresses) ? false : $addresses;
00086     }

getAddressEditUrl ( address  ) 

Definition at line 62 of file Book.php.

00063     {
00064         return $this->getUrl('customer/address/edit', array('_secure'=>true, 'id'=>$address->getId()));
00065     }

getAddressHtml ( address  ) 

Definition at line 88 of file Book.php.

00089     {
00090         return $address->format('html');
00091         //return $address->toString($address->getHtmlFormat());
00092     }

getBackUrl (  ) 

Definition at line 49 of file Book.php.

00050     {
00051         if ($this->getRefererUrl()) {
00052             return $this->getRefererUrl();
00053         }
00054         return $this->getUrl('customer/account/', array('_secure'=>true));
00055     }

getCustomer (  ) 

Definition at line 94 of file Book.php.

00095     {
00096         $customer = $this->getData('customer');
00097         if (is_null($customer)) {
00098             $customer = Mage::getSingleton('customer/session')->getCustomer();
00099             $this->setData('customer', $customer);
00100         }
00101         return $customer;
00102     }

getDeleteUrl (  ) 

Definition at line 57 of file Book.php.

00058     {
00059         return $this->getUrl('customer/address/delete');
00060     }

getPrimaryBillingAddress (  ) 

Definition at line 67 of file Book.php.

00068     {
00069         return $this->getCustomer()->getPrimaryBillingAddress();
00070     }

getPrimaryShippingAddress (  ) 

Definition at line 72 of file Book.php.

00073     {
00074         return $this->getCustomer()->getPrimaryShippingAddress();
00075     }

hasPrimaryAddress (  ) 

Definition at line 77 of file Book.php.

00078     {
00079         return $this->getPrimaryBillingAddress() || $this->getPrimaryShippingAddress();
00080     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:02 2009 for Magento by  doxygen 1.5.8