コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: Abstract.php プロジェクト: becchius/fiordivaniglia
 /**
  * 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();
 }
コード例 #3
0
 /**
  * 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());
 }
コード例 #4
0
ファイル: Configurable.php プロジェクト: arslbbt/mangentovies
 /**
  * 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;
 }