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() |
Definition at line 34 of file Resource.php.
_isAllowedAttribute | ( | $ | attribute, | |
array $ | filter = null | |||
) | [protected] |
Check is attribute allowed
Mage_Eav_Model_Entity_Attribute_Abstract | $attribute | |
array | $attributes |
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
Mage_Eav_Model_Entity_Abstract | $entity | |
array | $filter |
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 }
$_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.