本文整理汇总了PHP中Mage_Eav_Model_Entity_Attribute::isScopeGlobal方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Eav_Model_Entity_Attribute::isScopeGlobal方法的具体用法?PHP Mage_Eav_Model_Entity_Attribute::isScopeGlobal怎么用?PHP Mage_Eav_Model_Entity_Attribute::isScopeGlobal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Eav_Model_Entity_Attribute
的用法示例。
在下文中一共展示了Mage_Eav_Model_Entity_Attribute::isScopeGlobal方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: canDisplayUseDefault
/**
* Check "Use default" checkbox display availability
*
* @param Mage_Eav_Model_Entity_Attribute $attribute
* @return bool
*/
public function canDisplayUseDefault($attribute)
{
if (!$attribute->isScopeGlobal() && $this->getDataObject()->getStoreId()) {
return true;
}
return false;
}
示例2: deleteProductData
/**
* Delete product data
*
* @param Mage_Catalog_Model_Product $product
* @param Mage_Eav_Model_Entity_Attribute $attribute
* @return Enterprise_GiftCard_Model_Resource_Attribute_Backend_Giftcard_Amount
*/
public function deleteProductData($product, $attribute)
{
$condition = array();
if (!$attribute->isScopeGlobal()) {
if ($storeId = $product->getStoreId()) {
$condition['website_id IN (?)'] = array(0, Mage::app()->getStore($storeId)->getWebsiteId());
}
}
$condition['entity_id=?'] = $product->getId();
$condition['attribute_id=?'] = $attribute->getId();
$this->_getWriteAdapter()->delete($this->getMainTable(), $condition);
return $this;
}
示例3: getScopeLabel
/**
* Retrieve label of attribute scope
*
* GLOBAL | WEBSITE | STORE
*
* @param Mage_Eav_Model_Entity_Attribute $attribute
* @return string
*/
public function getScopeLabel($attribute)
{
$html = '';
if (Mage::app()->isSingleStoreMode()) {
return $html;
}
if ($attribute->isScopeGlobal()) {
$html .= '<br/>[GLOBAL]';
} elseif ($attribute->isScopeWebsite()) {
$html .= '<br/>[WEBSITE]';
} elseif ($attribute->isScopeStore()) {
$html .= '<br/>[STORE VIEW]';
}
return $html;
}
示例4: getScopeLabel
/**
* Retrieve label of attribute scope
*
* GLOBAL | WEBSITE | STORE
*
* @param Mage_Eav_Model_Entity_Attribute $attribute
* @return string
*/
public function getScopeLabel($attribute)
{
$html = '';
if (Mage::app()->isSingleStoreMode()) {
return $html;
}
if ($attribute->isScopeGlobal()) {
$html .= '<br/>' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('[GLOBAL]');
} elseif ($attribute->isScopeWebsite()) {
$html .= '<br/>' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('[WEBSITE]');
} elseif ($attribute->isScopeStore()) {
$html .= '<br/>' . Mage::helper('Mage_Adminhtml_Helper_Data')->__('[STORE VIEW]');
}
return $html;
}