Mage_Customer_Block_Account_Dashboard Class Reference

Inheritance diagram for Mage_Customer_Block_Account_Dashboard:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object Mage_Customer_Block_Form_Edit Mage_Customer_Block_Newsletter Mage_Review_Block_Customer_List Mage_Tag_Block_Customer_Tags

List of all members.

Public Member Functions

 getCustomer ()
 getAccountUrl ()
 getAddressesUrl ()
 getAddressEditUrl ($address)
 getOrdersUrl ()
 getReviewsUrl ()
 getWishlistUrl ()
 getTagsUrl ()
 getSubscriptionObject ()
 getManageNewsletterUrl ()
 getSubscriptionText ()
 getPrimaryAddresses ()
 getBackUrl ()

Protected Attributes

 $_subscription = null


Detailed Description

Definition at line 34 of file Dashboard.php.


Member Function Documentation

getAccountUrl (  ) 

Definition at line 43 of file Dashboard.php.

00044     {
00045         return Mage::getUrl('customer/account/edit', array('_secure'=>true));
00046     }

getAddressEditUrl ( address  ) 

Definition at line 53 of file Dashboard.php.

00054     {
00055         return Mage::getUrl('customer/address/edit', array('_secure'=>true, 'id'=>$address->getId()));
00056     }

getAddressesUrl (  ) 

Definition at line 48 of file Dashboard.php.

00049     {
00050         return Mage::getUrl('customer/address/index', array('_secure'=>true));
00051     }

getBackUrl (  ) 

Get back url in account dashboard

This method is copypasted in: Mage_Wishlist_Block_Customer_Wishlist - because of strange inheritance Mage_Customer_Block_Address_Book - because of secure url

Returns:
string

Definition at line 119 of file Dashboard.php.

00120     {
00121         // the RefererUrl must be set in appropriate controller
00122         if ($this->getRefererUrl()) {
00123             return $this->getRefererUrl();
00124         }
00125         return $this->getUrl('customer/account/');
00126     }

getCustomer (  ) 

Definition at line 38 of file Dashboard.php.

00039     {
00040         return Mage::getSingleton('customer/session')->getCustomer();
00041     }

getManageNewsletterUrl (  ) 

Definition at line 87 of file Dashboard.php.

00088     {
00089         return $this->getUrl('*/newsletter/manage');
00090     }

getOrdersUrl (  ) 

Definition at line 58 of file Dashboard.php.

00059     {
00060         return Mage::getUrl('customer/order/index', array('_secure'=>true));
00061     }

getPrimaryAddresses (  ) 

Definition at line 101 of file Dashboard.php.

00102     {
00103         $addresses = $this->getCustomer()->getPrimaryAddresses();
00104         if (empty($addresses)) {
00105             return false;
00106         }
00107         return $addresses;
00108     }

getReviewsUrl (  ) 

Definition at line 63 of file Dashboard.php.

00064     {
00065         return Mage::getUrl('review/customer/index', array('_secure'=>true));
00066     }

getSubscriptionObject (  ) 

Definition at line 78 of file Dashboard.php.

00079     {
00080         if(is_null($this->_subscription)) {
00081             $this->_subscription = Mage::getModel('newsletter/subscriber')->loadByCustomer($this->getCustomer());
00082         }
00083 
00084         return $this->_subscription;
00085     }

getSubscriptionText (  ) 

Definition at line 92 of file Dashboard.php.

00093     {
00094         if($this->getSubscriptionObject()->isSubscribed()) {
00095             return Mage::helper('customer')->__('You are currently subscribed to our newsletter');
00096         }
00097 
00098         return Mage::helper('customer')->__('You are currently not subscribed to our newsletter');
00099     }

getTagsUrl (  ) 

Definition at line 73 of file Dashboard.php.

00074     {
00075 
00076     }

getWishlistUrl (  ) 

Definition at line 68 of file Dashboard.php.

00069     {
00070         return Mage::getUrl('customer/wishlist/index', array('_secure'=>true));
00071     }


Member Data Documentation

$_subscription = null [protected]

Definition at line 36 of file Dashboard.php.


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