本文整理汇总了PHP中Zend_Form_Element_Xhtml::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Xhtml::render方法的具体用法?PHP Zend_Form_Element_Xhtml::render怎么用?PHP Zend_Form_Element_Xhtml::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Form_Element_Xhtml
的用法示例。
在下文中一共展示了Zend_Form_Element_Xhtml::render方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* Render form element
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$captcha = $this->getCaptcha();
$captcha->setName($this->getFullyQualifiedName());
if (!$this->loadDefaultDecoratorsIsDisabled()) {
$decorators = $this->getDecorators();
$decorator = $captcha->getDecorator();
$key = get_class($this->_getDecorator($decorator, null));
if (!empty($decorator) && !array_key_exists($key, $decorators)) {
array_unshift($decorators, $decorator);
}
$decorator = array('Captcha', array('captcha' => $captcha));
$key = get_class($this->_getDecorator($decorator[0], $decorator[1]));
if ($captcha instanceof Zend_Captcha_Word && !array_key_exists($key, $decorators)) {
array_unshift($decorators, $decorator);
}
$this->setDecorators($decorators);
}
$this->setValue($this->getCaptcha()->generate());
return parent::render($view);
}
示例2: render
/**
* Render form element
* Checks for decorator interface to prevent errors
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$marker = false;
foreach ($this->getDecorators() as $decorator) {
if ($decorator instanceof Zend_Form_Decorator_Marker_File_Interface) {
$marker = true;
}
}
if (!$marker) {
require_once 'Zend/Form/Element/Exception.php';
throw new Zend_Form_Element_Exception('No file decorator found... unable to render file element');
}
return parent::render($view);
}
示例3: render
/**
* Render CSRF token in form
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$this->initCsrfToken();
return parent::render($view);
}
示例4: render
/**
* Render form element
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$captcha = $this->getCaptcha();
$captcha->setName($this->getFullyQualifiedName());
$decorators = $this->getDecorators();
$decorator = $captcha->getDecorator();
if (!empty($decorator)) {
array_unshift($decorators, $decorator);
}
$decorator = array('Captcha', array('captcha' => $captcha));
array_unshift($decorators, $decorator);
$this->setDecorators($decorators);
$this->setValue($this->getCaptcha()->generate());
return parent::render($view);
}
示例5: render
/**
* Render
*
* Ensure that options property is set when rendering.
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$this->options = array('checked' => $this->getCheckedValue(), 'unChecked' => $this->getUncheckedValue());
return parent::render($view);
}
示例6: render
/**
* Render CSRF token in form
*
* @param Zend_View_Interface $view
* @return string
*/
public function render(Zend_View_Interface $view = null)
{
$this->setValue($this->_token);
return parent::render($view);
}