Mage_Customer_Model_Api_Resource Class Reference

Inheritance diagram for Mage_Customer_Model_Api_Resource:

Mage_Api_Model_Resource_Abstract Mage_Customer_Model_Address_Api Mage_Customer_Model_Customer_Api Mage_Customer_Model_Address_Api_V2 Mage_Customer_Model_Customer_Api_V2

List of all members.

Public Member Functions

 getAllowedAttributes ($entity, array $filter=null)

Protected Member Functions

 _isAllowedAttribute ($attribute, array $filter=null)

Protected Attributes

 $_ignoredAttributeCodes = array('entity_id', 'attribute_set_id', 'entity_type_id')
 $_ignoredAttributeTypes = array()


Detailed Description

Definition at line 34 of file Resource.php.


Member Function Documentation

_isAllowedAttribute ( attribute,
array filter = null 
) [protected]

Check is attribute allowed

Parameters:
Mage_Eav_Model_Entity_Attribute_Abstract $attribute
array $attributes
Returns:
boolean

Definition at line 57 of file Resource.php.

00058     {
00059         if (!is_null($filter)
00060             && !( in_array($attribute->getAttributeCode(), $filter)
00061                   || in_array($attribute->getAttributeId(), $filter))) {
00062             return false;
00063         }
00064 
00065         return !in_array($attribute->getFrontendInput(), $this->_ignoredAttributeTypes)
00066                && !in_array($attribute->getAttributeCode(), $this->_ignoredAttributeCodes);
00067     }

getAllowedAttributes ( entity,
array filter = null 
)

Return list of allowed attributes

Parameters:
Mage_Eav_Model_Entity_Abstract $entity
array $filter
Returns:
array

Definition at line 76 of file Resource.php.

00077     {
00078         $attributes = $entity->getResource()
00079                         ->loadAllAttributes($entity)
00080                         ->getAttributesByCode();
00081         $result = array();
00082         foreach ($attributes as $attribute) {
00083             if ($this->_isAllowedAttribute($attribute, $filter)) {
00084                 $result[$attribute->getAttributeCode()] = $attribute;
00085             }
00086         }
00087 
00088         return $result;
00089     }


Member Data Documentation

$_ignoredAttributeCodes = array('entity_id', 'attribute_set_id', 'entity_type_id') [protected]

Definition at line 41 of file Resource.php.

$_ignoredAttributeTypes = array() [protected]

Definition at line 48 of file Resource.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