本文整理汇总了PHP中HTML_QuickForm_input::toHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm_input::toHtml方法的具体用法?PHP HTML_QuickForm_input::toHtml怎么用?PHP HTML_QuickForm_input::toHtml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_QuickForm_input
的用法示例。
在下文中一共展示了HTML_QuickForm_input::toHtml方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toHtml
/**
* Returns the checkbox element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
// チェックの時のみラベルを表示
$label = $this->getChecked() ? $this->_text : '';
} else {
$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
}
return HTML_QuickForm_input::toHtml() . $label;
}
示例2: toHtml
function toHtml()
{
if ($this->isFrozen()) {
return $this->getFrozenHtml();
} else {
return parent::toHtml();
}
}
示例3: toHtml
/**
* Returns the radio element in HTML
*
* @since 1.0
* @access public
* @return string
*/
public function toHtml()
{
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
}
return HTML_QuickForm_input::toHtml() . $label;
}
示例4: toHtml
/**
* Returns the checkbox element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
$this->_generateId();
// Seems to be necessary when this is used in a group.
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
}
return HTML_QuickForm_input::toHtml() . $label;
}
示例5: toHtml
/**
* Returns the checkbox element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
$attributes = $this->getAttributes();
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen || isset($attributes['skiplabel'])) {
$label = $this->_text;
} else {
$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
}
unset($attributes['skipLabel']);
return HTML_QuickForm_input::toHtml() . $label;
}
示例6: toHtml
/**
* Returns the checkbox element in HTML
*
* @since 1.0
* @access public
* @return string
*/
public function toHtml()
{
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
$label = '<div class="checkbox">
<label ' . $this->getAttribute('label-class') . ' ">' . HTML_QuickForm_input::toHtml() . $this->_text . '</label>
</div>
';
return $label;
}
return HTML_QuickForm_input::toHtml() . $label;
}
示例7: toHtml
/**
* Returns the radio element in HTML
*
* @since 1.0
* @access public
* @return string
*/
public function toHtml()
{
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
$labelClass = $this->labelClass;
$radioClass = $this->radioClass;
$label = '<div class="' . $radioClass . '"><label class="' . $labelClass . '">' . HTML_QuickForm_input::toHtml() . $this->_text . '</label></div>';
return $label;
}
return HTML_QuickForm_input::toHtml() . $label;
}
示例8: toHtml
/**
* Returns the radio element in HTML
*
* @since 1.0
* @access public
* @return string
*/
function toHtml()
{
if (0 == strlen($this->_text)) {
$label = '';
} elseif ($this->_flagFrozen) {
$label = $this->_text;
} else {
///$label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
$label = '<label class="radio">' .HTML_QuickForm_input::toHtml().$this->_text . '</label>';
return $label;
}
return HTML_QuickForm_input::toHtml() . $label;
} //end func toHtml
示例9: toHtml
function toHtml()
{
// The captcha must desappear in frozen state
if ($this->_flagFrozen) {
return '';
}
switch ($this->_method) {
case 'Numbers_Words':
require_once 'Numbers/Words.php';
isset($this->_value) || ($this->_value = rand(1, 1000));
$html = ucfirst(Numbers_Words::toWords($this->_value, $this->_locale));
$html .= ' ' . parent::toHtml();
break;
default:
$html = '';
}
HTTP_Session2::set('_HTML_QuickForm_captcha', $this->_value);
return $html;
}
示例10: toHtml
/**
* Returns the attachment element in HTML
*
* @return string The html text
* @access public
*/
function toHtml()
{
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} elseif ($this->_state == QF_ATTACHMENT_UPLOADED) {
// Return the frozen html ...
$html = $this->getFrozenHtml();
// ... and append the html of the unload element (if any)
if (isset($this->_unload_element)) {
$html .= ' ' . $this->_unload_element->toHtml();
}
return $html;
}
return HTML_QuickForm_input::toHtml();
}