本文整理汇总了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);
}