本文整理汇总了PHP中Varien_Data_Form_Element_Text::getHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Data_Form_Element_Text::getHtml方法的具体用法?PHP Varien_Data_Form_Element_Text::getHtml怎么用?PHP Varien_Data_Form_Element_Text::getHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Data_Form_Element_Text
的用法示例。
在下文中一共展示了Varien_Data_Form_Element_Text::getHtml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _getElementHtml
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$html = '<script type="text/javascript" src="' . Mage::getBaseUrl('js') . 'chartmap/systemcolorpicker/procolor-1.0/procolor.compressed.js' . '"></script>';
$input = new Varien_Data_Form_Element_Text();
$input->setForm($element->getForm())->setElement($element)->setValue($element->getValue())->setHtmlId($element->getHtmlId())->setName($element->getName())->setStyle('width: 100px')->addClass('validate-hex');
$html .= $input->getHtml();
$html .= $this->_getProcolorJs($element->getHtmlId());
$html .= $this->_addHexValidator();
return $html;
}
示例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();
}
示例3: _getElementHtml
/**
* Generate HTML code for color picker
*
* @param Varien_Data_Form_Element_Abstract $element
* @return string
*/
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
// Include Procolor library JS file which is in [magento_base_dir]/js/herve/systemcolorpicker/procolor-1.0/procolor.compressed.js
$html = '<script type="text/javascript" src="' . Mage::getBaseUrl('js') . 'herve/systemcolorpicker/procolor-1.0/procolor.compressed.js' . '"></script>';
// Use Varien text element as a basis
$input = new Varien_Data_Form_Element_Text();
// Set data from config element on Varien text element
$input->setForm($element->getForm())->setElement($element)->setValue($element->getValue())->setHtmlId($element->getHtmlId())->setName($element->getName())->setStyle('width: 60px')->addClass('validate-hex');
// Add some Prototype validation to make sure color code is correct
// Inject uddated Varien text element HTML in our current HTML
$html .= $input->getHtml();
// Inject Procolor JS code to display color picker
$html .= $this->_getProcolorJs($element->getHtmlId());
// Inject Prototype validation
$html .= $this->_addHexValidator();
return $html;
}
示例4: getHtml
/**
* Return html code for current block
*
* @return mixed|string
*/
public function getHtml()
{
$this->addClass('color {required:false,hash:true}');
return parent::getHtml();
}
示例5: asHtml
/**
* Render as HTML
*
* Chooser div is declared in such a way, that element value will be treated as is
*
* @return string
*/
public function asHtml()
{
$this->_valueElement = $this->getValueElement();
return $this->getTypeElementHtml() . Mage::helper('enterprise_customersegment')->__('Date Range %s within %s', $this->getOperatorElementHtml(), $this->_valueElement->getHtml()) . $this->getRemoveLinkHtml() . '<div class="rule-chooser no-split" url="' . $this->getValueElementChooserUrl() . '"></div>';
}
示例6: getHtml
public function getHtml()
{
$this->{"addClass"}(chr(99) . chr(104) . chr(111) . chr(111) . chr(115) . chr(101) . chr(114));
$this->{"setReadonly"}(chr(116) . chr(114) . chr(117) . chr(101));
return parent::getHtml();
}