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


PHP Varien_Data_Form_Element_Abstract::setValue方法代码示例

本文整理汇总了PHP中Varien_Data_Form_Element_Abstract::setValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Abstract::setValue方法的具体用法?PHP Varien_Data_Form_Element_Abstract::setValue怎么用?PHP Varien_Data_Form_Element_Abstract::setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Varien_Data_Form_Element_Abstract的用法示例。


在下文中一共展示了Varien_Data_Form_Element_Abstract::setValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setStyle('width:70px;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $values = explode(',', $element->getValue());
     } else {
         $values = array();
     }
     $from = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
     $to = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
     return Mage::helper('adminhtml')->__('from') . ' ' . $from . ' ' . Mage::helper('adminhtml')->__('to') . ' ' . $to;
 }
开发者ID:codercv,项目名称:urbansurprisedev,代码行数:12,代码来源:YearRange.php

示例2: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setStyle('width:70px;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $values = explode(',', $element->getValue());
     } else {
         $values = array();
     }
     $width = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
     $height = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
     return Mage::helper('sales')->__('Width') . ' ' . $width . ' ' . Mage::helper('sales')->__('Height') . ' ' . $height;
 }
开发者ID:novayadi85,项目名称:navicet,代码行数:12,代码来源:Size.php

示例3: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setStyle('width:40px;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $values = explode(',', $element->getValue());
     } else {
         $values = array();
     }
     $top = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
     $right = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
     $bottom = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml();
     $left = $element->setValue(isset($values[3]) ? $values[3] : null)->getElementHtml();
     return $top . '  ' . Mage::helper('adminhtml')->__('Top, pt') . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . $right . '  ' . Mage::helper('adminhtml')->__('Right, pt') . '<br />' . $bottom . '  ' . Mage::helper('adminhtml')->__('Bottom, pt') . '    ' . $left . '  ' . Mage::helper('adminhtml')->__('Left, pt');
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:14,代码来源:Papernudge.php

示例4: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $_options = array('d' => Mage::helper('adminhtml')->__('Day'), 'm' => Mage::helper('adminhtml')->__('Month'), 'y' => Mage::helper('adminhtml')->__('Year'));
     $element->setValues($_options)->setClass('select-date')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $values = explode(',', $element->getValue());
     } else {
         $values = array();
     }
     $_parts = array();
     $_parts[] = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
     $_parts[] = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
     $_parts[] = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml();
     return implode(' <span>/</span> ', $_parts);
 }
开发者ID:okite11,项目名称:frames21,代码行数:15,代码来源:DateFieldsOrder.php

示例5: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $_options = array('d' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Day'), 'm' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Month'), 'y' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Year'));
     $element->setValues($_options)->setStyle('width:70px;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $values = explode(',', $element->getValue());
     } else {
         $values = array();
     }
     $_parts = array();
     $_parts[] = $element->setValue(isset($values[0]) ? $values[0] : null)->getElementHtml();
     $_parts[] = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml();
     $_parts[] = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml();
     return implode(' / ', $_parts);
 }
开发者ID:relue,项目名称:magento2,代码行数:15,代码来源:DateFieldsOrder.php

示例6: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $html = '';
     $data = Mage::getStoreConfig('auspost/activation/data');
     $ele_value = explode(',', str_replace($data, '', Mage::helper('core')->decrypt($element->getValue())));
     $ele_name = $element->getName();
     $ele_id = $element->getId();
     $element->setName($ele_name . '[]');
     $data_info = Mage::helper('auspost')->getDataInfo();
     if (isset($data_info['dom']) && intval($data_info['c']) > 0 && intval($data_info['suc']) == 1) {
         foreach (Mage::app()->getWebsites() as $website) {
             $url = $website->getConfig('web/unsecure/base_url');
             $url = Mage::helper('auspost')->getFormatUrl(trim(preg_replace('/^.*?\\/\\/(.*)?\\//', '$1', $url)));
             foreach ($data_info['dom'] as $web) {
                 if ($web['dom'] == $url && $web['suc'] == 1) {
                     $element->setChecked(false);
                     $id = $website->getId();
                     $name = $website->getName();
                     $element->setId($ele_id . '_' . $id);
                     $element->setValue($id);
                     if (in_array($id, $ele_value) !== false) {
                         $element->setChecked(true);
                     }
                     if ($id != 0) {
                         $html .= '<div><label>' . $element->getElementHtml() . ' ' . $name . ' </label></div>';
                     }
                 }
             }
         }
     } else {
         $html = sprintf('<strong class="required">%s</strong>', $this->__('Please enter a valid key'));
     }
     return $html;
 }
开发者ID:bogdy2p,项目名称:apstufgnto,代码行数:34,代码来源:Website.php

示例7: _getElementHtml

    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
        $value = $element->getValue();
        $element->setStyle('width:70px;')
                ->setType('hidden');
        $inputHidden = $element->setValue(isset($value) ? $value : 'pattern10')->getElementHtml();

		$skinDir = str_replace('adminhtml'.DS,'',Mage::getSingleton('core/design_package')->getSkinBaseDir(array('_package' => 'frontend\default')));
		$index = strrpos($skinDir, DS);
		$theme = substr($skinDir,$index + 1);
		
 
		$baseURL = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) . 'frontend/default/' . $theme . '/images/patterns/';
		
        $html = '<div class="bgpattern">';
        $html .= $inputHidden;

        $helper = Mage::helper('ves_tempcp/data');
        $data = $helper->getThemeInfo(1);
		
//		echo "<br/>";
//		var_dump($data); die;
		
        $patterns = $data['patterns'];
        
        foreach ($patterns as $p) {
            $html .='<div style="background:url(\'' . $baseURL . $p . '\');" onclick="return false;" href="#" title="' . $p . '" id="' . preg_replace("#\.\w+$#", "", $p) . '"></div>';
        }

        $html .= '</div>';
        return $html;
    }
开发者ID:amal-nibaya,项目名称:PB-BEERSHOP,代码行数:31,代码来源:CustomField.php

示例8: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $account = Mage::getModel('csapiclient/account');
     $json = $account->getApiKeyAsJson();
     $element->setValue($json);
     return parent::_getElementHtml($element);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:7,代码来源:Apikey.php

示例9: render

 /**
  * @param Varien_Data_Form_Element_Abstract $element
  *
  * @return string
  */
 public function render(Varien_Data_Form_Element_Abstract $element)
 {
     $realpath = str_replace('-', '/', str_replace('bronto_email_templates_', '', $element->getId()));
     $realValue = Mage::helper('bronto_email')->getAdminScopedConfig($realpath);
     $element->setValue($realValue);
     $element->setPath($realpath);
     return parent::render($element);
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:13,代码来源:Field.php

示例10: prepareElementHtml

 public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $tree = Mage::getResourceModel('cms/page_tree')->load();
     $element->setData('after_element_html', $tree->toSelectHtml($element->getName(), $element->getValue(), $element->getId()));
     $element->setValue();
     // Not needed because page is already selected in select box
     return $element;
 }
开发者ID:smart-devs,项目名称:magento-clever-cms,代码行数:8,代码来源:Chooser.php

示例11: _getElementHtml

 /**
  * Render field html
  *
  * @param Varien_Data_Form_Element_Abstract $element
  * @return string
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     /** @var $config Rakuten_Checkout_Model_Config */
     $config = Mage::getSingleton('rakuten/config');
     $callbackUrl = $config->getCallbackUrl();
     $element->setValue($callbackUrl);
     return $element->getValue();
 }
开发者ID:rakuten-deutschland,项目名称:checkout-magento,代码行数:14,代码来源:Url.php

示例12: _getElementHtml

 /**
  * 
  * (non-PHPdoc)
  * @see Mage_Adminhtml_Block_System_Config_Form_Field::_getElementHtml()
  */
 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $adminUser = Mage::getSingleton('admin/session')->getUser();
     $preference = Mage::getModel('extensions_store_storealerts/preference');
     $preference->load($adminUser->getId());
     $alerts = $preference->getId() ? $preference->getAlerts() : '';
     $element->setValue($alerts);
     return parent::_getElementHtml($element);
 }
开发者ID:ExtensionsStore,项目名称:StoreAlerts,代码行数:14,代码来源:Alerts.php

示例13: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setStyle('width:80px;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $value = $element->getValue();
     } else {
         $value = 0;
     }
     $from = $element->setValue(isset($value) ? $value : null)->getElementHtml();
     return $from . '   ' . Mage::helper('adminhtml')->__('X pt');
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:11,代码来源:Nudgename.php

示例14: _getElementHtml

 protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $element->setStyle('height:6em;')->setName($element->getName() . '[]');
     if ($element->getValue()) {
         $value = $element->getValue();
     } else {
         $value = '';
     }
     $from = $element->setValue(isset($value) ? $value : null)->getElementHtml();
     return $from;
     //.'   '.Mage::helper('adminhtml')->__('items');
 }
开发者ID:par-orillonsoft,项目名称:magento_work,代码行数:12,代码来源:Textarea.php

示例15: prepareElementHtml

 /**
  * Prepare chooser element HTML
  *
  * @param Varien_Data_Form_Element_Abstract $element Form Element
  * @return Varien_Data_Form_Element_Abstract
  */
 public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element)
 {
     $this->_elementValueId = "{$element->getId()}";
     $this->_selectedBanners = explode(',', $element->getValue());
     //Create hidden field that store selected banner ids
     $hidden = new Varien_Data_Form_Element_Hidden($element->getData());
     $hidden->setId($this->_elementValueId)->setForm($element->getForm());
     $hiddenHtml = $hidden->getElementHtml();
     $element->setValue('')->setValueClass('value2');
     $element->setData('after_element_html', $hiddenHtml . $this->toHtml());
     return $element;
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:18,代码来源:Chooser.php


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