Mage_Customer_Block_Widget_Name Class Reference

Inheritance diagram for Mage_Customer_Block_Widget_Name:

Mage_Customer_Block_Widget_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 _construct ()
 showPrefix ()
 isPrefixRequired ()
 getPrefixOptions ()
 showMiddlename ()
 showSuffix ()
 isSuffixRequired ()
 getSuffixOptions ()
 getClassName ()
 getContainerClassName ()

Protected Member Functions

 _showConfig ($key)


Detailed Description

Definition at line 27 of file Name.php.


Member Function Documentation

_construct (  ) 

Internal constructor, that is called from real constructor

Please override this one instead of overriding real __construct constructor

Please override this one instead of overriding real __construct constructor

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 29 of file Name.php.

00030     {
00031         parent::_construct();
00032 
00033         // default template location
00034         $this->setTemplate('customer/widget/name.phtml');
00035     }

_showConfig ( key  )  [protected]

Can show config value

Parameters:
string $key
Returns:
bool

Definition at line 43 of file Name.php.

00044     {
00045         $value = $this->getConfig($key);
00046         if (empty($value)) {
00047             return false;
00048         }
00049         return true;
00050     }

getClassName (  ) 

Definition at line 108 of file Name.php.

00109     {
00110         if (!$this->hasData('class_name')) {
00111             $this->setData('class_name', 'customer-name');
00112         }
00113         return $this->getData('class_name');
00114     }

getContainerClassName (  ) 

Definition at line 116 of file Name.php.

00117     {
00118         $class = $this->getClassName();
00119         $class .= $this->showPrefix() ? '-prefix' : '';
00120         $class .= $this->showMiddlename() ? '-middlename' : '';
00121         $class .= $this->showSuffix() ? '-suffix' : '';
00122         return $class;
00123     }

getPrefixOptions (  ) 

Definition at line 67 of file Name.php.

00068     {
00069         $options = trim($this->getConfig('prefix_options'));
00070         if (!$options) {
00071             return false;
00072         }
00073         $options = explode(';', $options);
00074         foreach ($options as &$v) {
00075             $v = $this->htmlEscape(trim($v));
00076         }
00077         return $options;
00078     }

getSuffixOptions (  ) 

Definition at line 95 of file Name.php.

00096     {
00097         $options = trim($this->getConfig('suffix_options'));
00098         if (!$options) {
00099             return false;
00100         }
00101         $options = explode(';', $options);
00102         foreach ($options as &$v) {
00103             $v = $this->htmlEscape(trim($v));
00104         }
00105         return $options;
00106     }

isPrefixRequired (  ) 

Definition at line 62 of file Name.php.

00063     {
00064         return $this->getConfig('prefix_show')=='req';
00065     }

isSuffixRequired (  ) 

Definition at line 90 of file Name.php.

00091     {
00092         return $this->getConfig('suffix_show') == 'req';
00093     }

showMiddlename (  ) 

Definition at line 80 of file Name.php.

00081     {
00082         return $this->_showConfig('middlename_show');
00083     }

showPrefix (  ) 

Can show prefix

Returns:
bool

Definition at line 57 of file Name.php.

00058     {
00059         return $this->_showConfig('prefix_show');
00060     }

showSuffix (  ) 

Definition at line 85 of file Name.php.

00086     {
00087         return $this->_showConfig('suffix_show');
00088     }


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