本文整理汇总了PHP中Zend\View\Renderer\PhpRenderer::formHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpRenderer::formHidden方法的具体用法?PHP PhpRenderer::formHidden怎么用?PHP PhpRenderer::formHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\View\Renderer\PhpRenderer
的用法示例。
在下文中一共展示了PhpRenderer::formHidden方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTemplate
public function getTemplate(PhpRenderer $view)
{
// Normalize vocab terms for use in a select element.
$terms = array_map('trim', explode(PHP_EOL, $this->vocab->terms()));
$valueOptions = array_combine($terms, $terms);
$hidden = new Hidden('customvocab');
$hidden->setAttributes(['class' => 'language'])->setValue($this->vocab->lang());
$select = new Select('customvocab');
$select->setAttributes(['class' => 'terms'])->setEmptyOption('Select Below')->setValueOptions($valueOptions);
return $view->formHidden($hidden) . $view->formSelect($select);
}
示例2: render
/**
* Render the form
*
* @param \Zend\View\Renderer\PhpRenderer $view
* @return string HTML form code
*/
public function render(\Zend\View\Renderer\PhpRenderer $view)
{
$this->prepare();
$output = $view->form()->openTag($this);
$output .= "\n";
if ($this->has('_csrf')) {
$output .= "<div>";
$output .= $view->formHidden($this->get('_csrf'));
$output .= "</div>\n";
}
$output .= $this->renderFieldset($view, $this);
$output .= "\n";
$output .= $view->form()->closeTag();
$output .= "\n";
return $output;
}
示例3: render
/**
* Render the form
*
* @param \Zend\View\Renderer\PhpRenderer $view
* @return string HTML form code
*/
public function render(\Zend\View\Renderer\PhpRenderer $view)
{
$output = '';
if ($this->_errorPostMaxSize) {
$output .= $view->htmlElement('p', sprintf($view->translate('The post_max_size value of %s has been exceeded.'), ini_get('post_max_size')), array('class' => 'error'));
}
$this->prepare();
$output .= $view->form()->openTag($this);
$output .= "\n";
if ($this->has('_csrf')) {
$output .= "<div>";
$output .= $view->formHidden($this->get('_csrf'));
$output .= "</div>\n";
}
$output .= $this->renderFieldset($view, $this);
$output .= "\n";
$output .= $view->form()->closeTag();
$output .= "\n";
return $output;
}