本文整理汇总了PHP中Varien_Data_Form_Element_Abstract::unsScope方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Abstract::unsScope方法的具体用法?PHP Varien_Data_Form_Element_Abstract::unsScope怎么用?PHP Varien_Data_Form_Element_Abstract::unsScope使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Abstract
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Abstract::unsScope方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
if ($element->getScope() == "stores") {
$this->setStoreId($element->getScopeId());
}
// Remove the scope information so it doesn't get printed out
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
return parent::render($element);
}
示例2: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
// Only show the current scope hasn't been configured yet
switch ($element->getScope()) {
case "stores":
if ($this->hasApiKeys($element->getScopeId())) {
return "";
}
break;
case "websites":
$website = Mage::app()->getWebsite($element->getScopeId());
if ($this->hasApiKeys($website->getStores())) {
return "";
}
break;
default:
if ($this->hasApiKeys()) {
return "";
}
}
// Remove the scope information so it doesn't get printed out
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
return parent::render($element);
}
示例3: render
/**
* Remove scope label
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
return parent::render($element);
}
示例4: render
/**
* Remove the "scope" value
*
* @param Varien_Data_Form_Element_Abstract $element
*
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
$element->setLabel($this->_getButtonHtml($element));
return parent::render($element);
}
示例5: render
/**
* Unset scope label and pass further to parent render()
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
public function render(Varien_Data_Form_Element_Abstract $element)
{
// Unset the scope label near the button
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
return parent::render($element);
}