當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。