本文整理汇总了PHP中Varien_Data_Form_Element_Select::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Select::setName方法的具体用法?PHP Varien_Data_Form_Element_Select::setName怎么用?PHP Varien_Data_Form_Element_Select::setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Select
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Select::setName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render(Varien_Data_Form_Element_Abstract $element)
{
$html = $this->_getHeaderHtml($element);
$renderer = Mage::getBlockSingleton('adminhtml/system_config_form_field');
$attributes = Mage::getConfig()->getNode(self::XML_PATH_IMAGE_TYPES)->asArray();
foreach ($attributes as $key => $attribute) {
/**
* Watermark size field
*/
$field = new Varien_Data_Form_Element_Text();
$field->setName("groups[watermark][fields][{$key}_size][value]")->setForm($this->getForm())->setLabel(Mage::helper('adminhtml')->__('Size for %s', $attribute['title']))->setRenderer($renderer);
$html .= $field->toHtml();
/**
* Watermark upload field
*/
$field = new Varien_Data_Form_Element_Imagefile();
$field->setName("groups[watermark][fields][{$key}_image][value]")->setForm($this->getForm())->setLabel(Mage::helper('adminhtml')->__('Watermark File for %s', $attribute['title']))->setRenderer($renderer);
$html .= $field->toHtml();
/**
* Watermark position field
*/
$field = new Varien_Data_Form_Element_Select();
$field->setName("groups[watermark][fields][{$key}_position][value]")->setForm($this->getForm())->setLabel(Mage::helper('adminhtml')->__('Position of Watermark for %s', $attribute['title']))->setRenderer($renderer)->setValues(Mage::getSingleton('adminhtml/system_config_source_catalog_product_watermark_position')->toOptionArray());
$html .= $field->toHtml();
}
$html .= $this->_getFooterHtml($element);
return $html;
}
示例2: toFormElementSelect
/**
*
* @return Varien_Data_Form_Element_Select
*/
public function toFormElementSelect()
{
$data = $this->get();
natcasesort($data);
array_unshift($data, '');
$selectType = new Varien_Data_Form_Element_Select();
$selectType->setName('job_code')->setId('job_code')->setForm(new Varien_Data_Form())->addClass('required-entry')->setValues($data);
return $selectType;
}
示例3: setName
/**
* Set name to quantity element in addition to current element
*
* @param string $name
*/
public function setName($name)
{
$this->_qty->setName($name . '[qty]');
parent::setName($name . '[is_in_stock]');
}
示例4: getAttributeSetsSelectElement
/**
* Get Select field with list of available attribute sets for some target country
*
* @param string $targetCountry
* @return Varien_Data_Form_Element_Select
*/
public function getAttributeSetsSelectElement($targetCountry)
{
$field = new Varien_Data_Form_Element_Select();
$field->setName('attribute_set_id')->setId('select_attribute_set')->setForm(new Varien_Data_Form())->addClass('required-entry')->setValues($this->_getAttributeSetsArray($targetCountry));
return $field;
}
示例5: getItemTypesSelectElement
public function getItemTypesSelectElement($targetCountry)
{
$field = new Varien_Data_Form_Element_Select();
$field->setName('gbase_itemtype')->setId('select_itemtype')->setForm(new Varien_Data_Form())->addClass('required-entry')->setValues($this->_getGbaseItemTypesArray($targetCountry));
return $field;
}