當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Varien_Data_Form_Element_Hidden::setForm方法代碼示例

本文整理匯總了PHP中Varien_Data_Form_Element_Hidden::setForm方法的典型用法代碼示例。如果您正苦於以下問題:PHP Varien_Data_Form_Element_Hidden::setForm方法的具體用法?PHP Varien_Data_Form_Element_Hidden::setForm怎麽用?PHP Varien_Data_Form_Element_Hidden::setForm使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Varien_Data_Form_Element_Hidden的用法示例。


在下文中一共展示了Varien_Data_Form_Element_Hidden::setForm方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAfterElementHtml

 public function getAfterElementHtml()
 {
     $html = $this->getData('after_element_html');
     $product = Mage::registry('product');
     $storeId = $product->getStoreId();
     $store = Mage::app()->getStore($storeId);
     $html .= '<strong>[' . (string) $store->getBaseCurrencyCode() . ']</strong>';
     if (Mage::helper('tax')->priceIncludesTax($store)) {
         $inclTax = Mage::helper('tax')->__('Inc. Tax');
         $html .= " <strong>[{$inclTax} <span id=\"dynamic-tax-{$this->getHtmlId()}\"></span>]</strong>";
     }
     if (!is_numeric($this->getIdentifier())) {
         return $html;
     }
     $data = array('name' => str_replace('[price]', '[update_price]', $this->getData('name')), 'disabled' => true);
     $hidden = new Varien_Data_Form_Element_Hidden($data);
     $hidden->setForm($this->getForm());
     $data['html_id'] = str_replace('[price]', '[update_price]', $this->getHtmlId());
     $data['label'] = Mage::helper('adyen_subscription')->__('Update prices of all existing subscriptions (prices be updated by cron)', $this->getData('subscription_count'));
     $data['value'] = 1;
     $checkbox = new Varien_Data_Form_Element_Checkbox($data);
     $checkbox->setForm($this->getForm());
     $checkbox->getElementHtml();
     return $html . "<br />\n" . $checkbox->getElementHtml() . $checkbox->getLabelHtml();
 }
開發者ID:sandermangel,項目名稱:adyen-magento-subscription,代碼行數:25,代碼來源:Price.php

示例2: getHtml

 public function getHtml()
 {
     $hidden = new Varien_Data_Form_Element_Hidden($this->getData());
     $hidden->setData('label', null);
     $hidden->setForm($this->getForm());
     $this->setId($this->getId() . '_query');
     $this->setName($this->getId());
     $this->setValue($this->_value);
     return $hidden->getHtml() . parent::getHtml() . $this->_getJs();
 }
開發者ID:praxigento,項目名稱:mage_app_prxgt_store,代碼行數:10,代碼來源:Autocompleter.php

示例3: getElementHtml

 /**
  * Return checkbox html with hidden field for correct config values
  *
  * @param string $elementId
  * @return string
  */
 public function getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     if ($element->getType() != 'checkbox') {
         return $element->getElementHtml();
     }
     $configValue = (string) $element->getValue();
     if ($configValue) {
         $element->setChecked(true);
     } else {
         $element->setValue('1');
     }
     if ($element->getCanUseDefaultValue() && $element->getInherit()) {
         $element->setDisabled(true);
     }
     $hidden = new Varien_Data_Form_Element_Hidden(array('html_id' => $element->getHtmlId() . '_value', 'name' => $element->getName(), 'value' => '0'));
     $hidden->setForm($element->getForm());
     return $hidden->getElementHtml() . $element->getElementHtml();
 }
開發者ID:jronatay,項目名稱:ultimo-magento-jron,代碼行數:24,代碼來源:Global.php

示例4: getElementHtml

 public function getElementHtml()
 {
     $element = $this->getElement();
     if (!$element->getValue()) {
         return parent::getElementHtml();
     }
     $element->setOnkeyup("onUrlkeyChanged('" . $element->getHtmlId() . "')");
     $element->setOnchange("onUrlkeyChanged('" . $element->getHtmlId() . "')");
     $data = array('name' => $element->getData('name') . '_create_redirect', 'disabled' => true);
     $hidden = new Varien_Data_Form_Element_Hidden($data);
     $hidden->setForm($element->getForm());
     $storeId = $element->getForm()->getDataObject()->getStoreId();
     $data['html_id'] = $element->getHtmlId() . '_create_redirect';
     $data['label'] = Mage::helper('catalog')->__('Create Permanent Redirect for old URL');
     $data['value'] = $element->getValue();
     $data['checked'] = Mage::helper('catalog')->shouldSaveUrlRewritesHistory($storeId);
     $checkbox = new Varien_Data_Form_Element_Checkbox($data);
     $checkbox->setForm($element->getForm());
     return parent::getElementHtml() . '<br/>' . $hidden->getElementHtml() . $checkbox->getElementHtml() . $checkbox->getLabelHtml();
 }
開發者ID:par-orillonsoft,項目名稱:app,代碼行數:20,代碼來源:Urlkey.php

示例5: _getDummyFieldInput

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  * @return Varien_Data_Form_Element_Hidden
  */
 protected function _getDummyFieldInput(Varien_Data_Form_Element_Abstract $element)
 {
     $dummyInput = new Varien_Data_Form_Element_Hidden();
     $dummyInput->setForm($element->getForm())->setId($this->_getDummyInputId($element))->setName($this->_getDummyInputName($element))->setReadonly(true);
     return $dummyInput;
 }
開發者ID:Rizsti,項目名稱:Extendix_AdminFormChooserButton,代碼行數:10,代碼來源:ImageChooser.php


注:本文中的Varien_Data_Form_Element_Hidden::setForm方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。