本文整理汇总了PHP中HTML_QuickForm2_Renderer::methodExists方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm2_Renderer::methodExists方法的具体用法?PHP HTML_QuickForm2_Renderer::methodExists怎么用?PHP HTML_QuickForm2_Renderer::methodExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_QuickForm2_Renderer
的用法示例。
在下文中一共展示了HTML_QuickForm2_Renderer::methodExists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: methodExists
/**
* Checks whether a method is available in this object
*
* A method is considered available if this class has such a public method,
* if a proxied renderer publishes such a method, if some plugin has such
* a public method.
*
* @param string Method name
* @return bool
*/
public function methodExists($name)
{
$lower = strtolower($name);
$exists = parent::methodExists($name) || isset($this->_rendererMethods[$lower]);
if (!$exists) {
$this->updatePlugins();
$exists = isset($this->_pluginMethods[$lower]);
}
return $exists;
}