当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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;
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:28,代码来源:Watermark.php

示例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;
 }
开发者ID:praxigento,项目名称:mage_app_prxgt_store,代码行数:13,代码来源:Code.php

示例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]');
 }
开发者ID:nickimproove,项目名称:magento2,代码行数:10,代码来源:Stock.php

示例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;
 }
开发者ID:natxetee,项目名称:magento2,代码行数:12,代码来源:Form.php

示例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;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:6,代码来源:Form.php


注:本文中的Varien_Data_Form_Element_Select::setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。