本文整理匯總了PHP中HTML_QuickForm2_Renderer::renderElement方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTML_QuickForm2_Renderer::renderElement方法的具體用法?PHP HTML_QuickForm2_Renderer::renderElement怎麽用?PHP HTML_QuickForm2_Renderer::renderElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類HTML_QuickForm2_Renderer
的用法示例。
在下文中一共展示了HTML_QuickForm2_Renderer::renderElement方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: render
public function render(HTML_QuickForm2_Renderer $renderer)
{
// render as a normal select when frozen
if ($this->frozen) {
$renderer->renderElement($this);
} else {
$jsBuilder = $renderer->getJavascriptBuilder();
$this->renderClientRules($jsBuilder);
$jsBuilder->addLibrary('dualselect', 'dualselect.js', 'js/', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR);
$keepSorted = empty($this->data['keepSorted']) ? 'false' : 'true';
$jsBuilder->addElementJavascript("qf.elements.dualselect.init('{$this->getId()}', {$keepSorted});");
// Fall back to using the Default renderer if custom one does not have a plugin
if ($renderer->methodExists('renderDualSelect')) {
$renderer->renderDualSelect($this);
} else {
$renderer->renderElement($this);
}
}
return $renderer;
}
示例2: render
/**
* Renders the element using the given renderer
*
* @param HTML_QuickForm2_Renderer $renderer
*
* @return HTML_QuickForm2_Renderer
*/
public function render(HTML_QuickForm2_Renderer $renderer)
{
$renderer->renderElement($this);
$this->renderClientRules($renderer->getJavascriptBuilder());
return $renderer;
}
示例3: render
/**
* Renders the element using the given renderer
*
* @param HTML_QuickForm2_Renderer Renderer instance
* @return HTML_QuickForm2_Renderer
*/
public function render(HTML_QuickForm2_Renderer $renderer)
{
foreach ($this->rules as $rule) {
if ($rule[1] & HTML_QuickForm2_Rule::RUNAT_CLIENT) {
$renderer->getJavascriptBuilder()->addRule($rule[0]);
}
}
$renderer->renderElement($this);
return $renderer;
}
示例4: render
/**
* Renders the element using the given renderer
*
* @param HTML_QuickForm2_Renderer Renderer instance
* @return HTML_QuickForm2_Renderer
*/
public function render(HTML_QuickForm2_Renderer $renderer)
{
$renderer->renderElement($this);
return $renderer;
}
示例5: renderElement
public function renderElement(HTML_QuickForm2_Node $element)
{
$this->_renderer->renderElement($element);
}