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


PHP Varien_Data_Form_Element_Select::setForm方法代碼示例

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


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

示例1: testGetElementHtmlContainsScriptTag

 public function testGetElementHtmlContainsScriptTag()
 {
     $element = new Varien_Data_Form_Element_Select();
     $element->setForm(new Varien_Object());
     $block = new Netresearch_OPS_Block_System_Config_Mode();
     $html = $block->render($element);
     $this->assertTrue(preg_match('/<script/', $html) > 0);
 }
開發者ID:roshu1980,項目名稱:add-computers,代碼行數:8,代碼來源:ModeTest.php

示例2: _renderCellTemplate

 /**
  * Render array cell for prototypeJS template
  *
  * @param string $columnName
  * @return string
  */
 protected function _renderCellTemplate($columnName)
 {
     if ($columnName == 'value' && isset($this->_columns[$columnName])) {
         $element = new Varien_Data_Form_Element_Select();
         $element->setForm($this->getForm())->setName($this->_getCellInputElementName($columnName))->setHtmlId($this->_getCellInputElementId('#{_id}', $columnName))->setValues(Mage::getModel('Mage_Core_Model_Design_Source_Design')->getAllOptions(false));
         return str_replace("\n", '', $element->getElementHtml());
     }
     return parent::_renderCellTemplate($columnName);
 }
開發者ID:nemphys,項目名稱:magento2,代碼行數:15,代碼來源:Regexceptions.php

示例3: _toHtml

 /**
  * @return string
  */
 protected function _toHtml()
 {
     $htmlId = $this->getColumnName() . '#{_id}';
     $select = new Varien_Data_Form_Element_Select(array('html_id' => $htmlId, 'no_span' => TRUE, 'name' => $this->getInputName()));
     $select->addData($this->getColumn());
     $select->setForm(new Varien_Object());
     $select->setValues($this->getValues());
     // Escape properly and use javascript to set the selected values
     return str_replace(array("\n", '"', '/'), array('', '\\"', '\\/'), "\n    {$select->getElementHtml()}\n    <script type=\"text\\/javascript\">\n      \$(\"{$htmlId}\").setValue(\"#{{$this->getColumnName()}}\");\n    </script>\n    ");
 }
開發者ID:tegansnyder,項目名稱:Logger,代碼行數:13,代碼來源:Select.php

示例4: render

 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $__html = '';
     if (!Mage::app()->isSingleStoreMode()) {
         $__replacingElement = new Varien_Data_Form_Element_Select();
         $__replacingElement->setData($element->getData());
         $__replacingElement->setForm($element->getForm());
         $__html = parent::render($__replacingElement);
     }
     return $__html;
 }
開發者ID:ashfaqphplhr,項目名稱:artificiallawnsforturf,代碼行數:11,代碼來源:AdminhtmlWidgetFieldStorefilter.php

示例5: setForm

 /**
  * Set form to quantity element in addition to current element
  *
  * @param $form
  * @return Varien_Data_Form
  */
 public function setForm($form)
 {
     $this->_qty->setForm($form);
     return parent::setForm($form);
 }
開發者ID:nickimproove,項目名稱:magento2,代碼行數:11,代碼來源:Stock.php

示例6: getFormattersHtml

 public function getFormattersHtml($name, $value = null)
 {
     $element = new Varien_Data_Form_Element_Select();
     $element->setForm(new Varien_Object())->setValue($value)->setName($name)->setValues(array('' => Mage::helper('rule')->__('Default'), 'intval' => Mage::helper('rule')->__('Integer'), 'price' => Mage::helper('rule')->__('Price'), 'strip_tags' => Mage::helper('rule')->__('Strip Tags')));
     return $element->getElementHtml();
 }
開發者ID:cesarfelip3,項目名稱:clevermage_new,代碼行數:6,代碼來源:Mirasvit_Helpdesk_Helper_Rule.php

示例7: _getSelect

 protected function _getSelect($name, $value, $extra, $values)
 {
     $element = new Varien_Data_Form_Element_Select();
     $element->setForm(new Varien_Object())->setValue($value)->setName($name)->addData($extra)->setValues($values);
     return $element->getElementHtml();
 }
開發者ID:ashfaqphplhr,項目名稱:artificiallawnsforturf,代碼行數:6,代碼來源:Html.php


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