Mage_Customer_Helper_Data Class Reference

Inheritance diagram for Mage_Customer_Helper_Data:

Mage_Core_Helper_Abstract

List of all members.

Public Member Functions

 isLoggedIn ()
 getCustomer ()
 getGroups ()
 getCurrentCustomer ()
 getCustomerName ()
 customerHasAddresses ()
 getLoginUrl ()
 getLoginPostUrl ()
 getLogoutUrl ()
 getDashboardUrl ()
 getAccountUrl ()
 getRegisterUrl ()
 getRegisterPostUrl ()
 getEditUrl ()
 getEditPostUrl ()
 getForgotPasswordUrl ()
 isConfirmationRequired ()
 getEmailConfirmationUrl ($email=null)
 isRegistrationAllowed ()

Protected Attributes

 $_groups


Detailed Description

Definition at line 35 of file Data.php.


Member Function Documentation

customerHasAddresses (  ) 

Check customer has address

Returns:
bool

Definition at line 107 of file Data.php.

00108     {
00109         return count($this->getCustomer()->getAddresses()) > 0;
00110     }

getAccountUrl (  ) 

Retrieve customer account page url

Returns:
string

Definition at line 161 of file Data.php.

00162     {
00163         return $this->_getUrl('customer/account');
00164     }

getCurrentCustomer (  ) 

Retrieve current (loggined) customer object

Returns:
Mage_Customer_Model_Customer

Definition at line 87 of file Data.php.

00088     {
00089         return $this->getCustomer();
00090     }

getCustomer (  ) 

Retrieve logged in customer

Returns:
Mage_Customer_Model_Customer

Definition at line 59 of file Data.php.

00060     {
00061         if (empty($this->_customer)) {
00062             $this->_customer = Mage::getSingleton('customer/session')->getCustomer();
00063         }
00064         return $this->_customer;
00065     }

getCustomerName (  ) 

Retrieve current customer name

Returns:
string

Definition at line 97 of file Data.php.

00098     {
00099         return $this->getCustomer()->getName();
00100     }

getDashboardUrl (  ) 

Retrieve customer dashboard url

Returns:
string

Definition at line 151 of file Data.php.

00152     {
00153         return $this->_getUrl('customer/account');
00154     }

getEditPostUrl (  ) 

Retrieve customer edit POST URL

Returns:
string

Definition at line 201 of file Data.php.

00202     {
00203         return $this->_getUrl('customer/account/editpost');
00204     }

getEditUrl (  ) 

Retrieve customer account edit form url

Returns:
string

Definition at line 191 of file Data.php.

00192     {
00193         return $this->_getUrl('customer/account/edit');
00194     }

getEmailConfirmationUrl ( email = null  ) 

Retrieve confirmation URL for Email

Parameters:
string $email
Returns:
string

Definition at line 232 of file Data.php.

00233     {
00234         return $this->_getUrl('customer/account/confirmation', array('email' => $email));
00235     }

getForgotPasswordUrl (  ) 

Retrieve url of forgot password page

Returns:
string

Definition at line 211 of file Data.php.

00212     {
00213         return $this->_getUrl('customer/account/forgotpassword');
00214     }

getGroups (  ) 

Retrieve customer groups collection

Returns:
Mage_Customer_Model_Entity_Group_Collection

Definition at line 72 of file Data.php.

00073     {
00074         if (empty($this->_groups)) {
00075             $this->_groups = Mage::getModel('customer/group')->getResourceCollection()
00076                 ->setRealGroupsFilter()
00077                 ->load();
00078         }
00079         return $this->_groups;
00080     }

getLoginPostUrl (  ) 

Retrieve customer login POST URL

Returns:
string

Definition at line 131 of file Data.php.

00132     {
00133         return $this->_getUrl('customer/account/loginPost');
00134     }

getLoginUrl (  ) 

Retrieve customer login url

Returns:
string

Definition at line 121 of file Data.php.

00122     {
00123         return $this->_getUrl('customer/account/login');
00124     }

getLogoutUrl (  ) 

Retrieve customer logout url

Returns:
string

Definition at line 141 of file Data.php.

00142     {
00143         return $this->_getUrl('customer/account/logout');
00144     }

getRegisterPostUrl (  ) 

Retrieve customer register form post url

Returns:
string

Definition at line 181 of file Data.php.

00182     {
00183         return $this->_getUrl('customer/account/createpost');
00184     }

getRegisterUrl (  ) 

Retrieve customer register form url

Returns:
string

Definition at line 171 of file Data.php.

00172     {
00173         return $this->_getUrl('customer/account/create');
00174     }

isConfirmationRequired (  ) 

Check is confirmation required

Returns:
bool

Definition at line 221 of file Data.php.

00222     {
00223         return $this->getCustomer()->isConfirmationRequired();
00224     }

isLoggedIn (  ) 

Check customer is logged in

Returns:
bool

Definition at line 49 of file Data.php.

00050     {
00051         return Mage::getSingleton('customer/session')->isLoggedIn();
00052     }

isRegistrationAllowed (  ) 

Check whether customers registration is allowed

Returns:
bool

Definition at line 242 of file Data.php.

00243     {
00244         $result = new Varien_Object(array('is_allowed' => true));
00245         Mage::dispatchEvent('customer_registration_is_allowed', array('result' => $result));
00246         return $result->getIsAllowed();
00247     }


Member Data Documentation

$_groups [protected]

Definition at line 42 of file Data.php.


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

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