/** * Checkin attribute availability for create superproduct * * @param Mage_Eav_Model_Entity_Attribute $attribute * @return bool */ public function canUseAttribute(Mage_Eav_Model_Entity_Attribute $attribute) { $allow = $attribute->getIsGlobal() == Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL && $attribute->getIsVisible() && $attribute->getIsConfigurable() && $attribute->usesSource() && $attribute->getIsUserDefined(); return $allow; }
/** * Return whether given attribute is editable * * @param string $type Grid block type * @param Mage_Eav_Model_Entity_Attribute $attribute Attribute object * @return bool */ protected function _checkAttributeEditability($type, $attribute) { return (!$attribute->hasIsVisible() || $attribute->getIsVisible()) && $attribute->getFrontend()->getInputType(); }
/** * Check whether attribute is visible * * @param Mage_Eav_Model_Entity_Attribute $attribute * @return bool */ protected function _isAttributeVisible(Mage_Eav_Model_Entity_Attribute $attribute) { return !(!$attribute || $attribute->hasIsVisible() && !$attribute->getIsVisible()); }
/** * Checkin attribute availability for create superproduct * * @param Mage_Eav_Model_Entity_Attribute $attribute * @return bool */ public function canUseAttribute(Mage_Eav_Model_Entity_Attribute $attribute) { $allow = $attribute->getIsGlobal() && $attribute->getIsVisible() && $attribute->getIsConfigurable() && $attribute->usesSource(); return $allow; }