Mage_Customer_Model_Customer_Attribute_Source_Website Class Reference

Inheritance diagram for Mage_Customer_Model_Customer_Attribute_Source_Website:

Mage_Eav_Model_Entity_Attribute_Source_Table Mage_Eav_Model_Entity_Attribute_Source_Abstract Mage_Eav_Model_Entity_Attribute_Source_Interface

List of all members.

Public Member Functions

 getAllOptions ()
 getOptionText ($value)


Detailed Description

Definition at line 34 of file Website.php.


Member Function Documentation

getAllOptions (  ) 

Retrieve All options

Returns:
array

Implements Mage_Eav_Model_Entity_Attribute_Source_Interface.

Definition at line 36 of file Website.php.

00037     {
00038         if (!$this->_options) {
00039             $this->_options = Mage::getSingleton('adminhtml/system_store')->getWebsiteValuesForForm(true, true);
00040         }
00041 
00042         return $this->_options;
00043     }

getOptionText ( value  ) 

Get a text for option value

Parameters:
string|integer $value
Returns:
string

Reimplemented from Mage_Eav_Model_Entity_Attribute_Source_Table.

Definition at line 45 of file Website.php.

00046     {
00047         if (!$this->_options) {
00048           $this->_options = $this->getAllOptions();
00049         }
00050         foreach ($this->_options as $option) {
00051           if ($option['value'] == $value) {
00052             return $option['label'];
00053           }
00054         }
00055         return false;
00056     }


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

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