Mage_Customer_Block_Form_Register Class Reference

Inheritance diagram for Mage_Customer_Block_Form_Register:

Mage_Directory_Block_Data Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getPostActionUrl ()
 getBackUrl ()
 getFormData ()
 getCountryId ()
 getRegion ()
 isNewsletterEnabled ()

Protected Member Functions

 _prepareLayout ()


Detailed Description

Customer register form block

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 32 of file Register.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 34 of file Register.php.

00035     {
00036         $this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Create New Customer Account'));
00037         return parent::_prepareLayout();
00038     }

getBackUrl (  ) 

Retrieve back url

Returns:
string

Definition at line 55 of file Register.php.

00056     {
00057         $url = $this->getData('back_url');
00058         if (is_null($url)) {
00059             $url = $this->helper('customer')->getLoginUrl();
00060         }
00061         return $url;
00062     }

getCountryId (  ) 

Retrieve customer country identifier

Returns:
int

Reimplemented from Mage_Directory_Block_Data.

Definition at line 84 of file Register.php.

00085     {
00086         if ($countryId = $this->getFormData()->getCountryId()) {
00087             return $countryId;
00088         }
00089         return parent::getCountryId();
00090     }

getFormData (  ) 

Retrieve form data

Returns:
Varien_Object

Definition at line 69 of file Register.php.

00070     {
00071         $data = $this->getData('form_data');
00072         if (is_null($data)) {
00073             $data = new Varien_Object(Mage::getSingleton('customer/session')->getCustomerFormData(true));
00074             $this->setData('form_data', $data);
00075         }
00076         return $data;
00077     }

getPostActionUrl (  ) 

Retrieve form posting url

Returns:
string

Definition at line 45 of file Register.php.

00046     {
00047         return $this->helper('customer')->getRegisterPostUrl();
00048     }

getRegion (  ) 

Retrieve customer region identifier

Returns:
int

Definition at line 97 of file Register.php.

00098     {
00099         if ($region = $this->getFormData()->getRegion()) {
00100             return $region;
00101         }
00102         elseif ($region = $this->getFormData()->getRegionId()) {
00103             return $region;
00104         }
00105         return null;
00106     }

isNewsletterEnabled (  ) 

Newsletter module availability

Returns:
boolean

Definition at line 113 of file Register.php.

00114     {
00115         return !Mage::getStoreConfigFlag('advanced/modules_disable_output/Mage_Newsletter');
00116     }


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