本文整理汇总了PHP中Container::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::render方法的具体用法?PHP Container::render怎么用?PHP Container::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::render方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
empty($this->data) ? $this->_retrieveData() : null;
if ($this->template != null) {
$this->template->clearErrors();
$template = $this->template->render();
}
$ret = "<div>\n {$template}\n </div>";
return $ret;
}
示例2: render
public function render()
{
$id = "multiform-" . $this->index;
$this->setId($id);
$attributes = $this->getAttributes();
if ($this->data == null) {
$this->_retrieveData();
}
if ($this->template != null) {
$this->template->clearErrors();
$template = $this->template->render();
$count = 0;
foreach ($this->data as $index => $data) {
foreach ($data as $key => $dat) {
$data[$this->templateName . "." . $key . "[]"] = $dat;
}
//$this->clearErrors();
$this->template->setData($data);
//$retval = $this->template->validate();
$this->template->setId("multiform-content-" . $index);
$this->template->getElementById("multi-form-buttons")->buttons[0]->addAttribute("onclick", "fapiMultiFormRemove('{$index}')");
$contents .= "<div id='multi-form-content-{$index}'>" . $this->template->render() . "</div>";
}
}
$ret = "<div {$attributes} >\n <input type='hidden' id='multiform-numitems-{$this->index}' value='{$count}'/>\n <div id='multiform-contents-{$this->index}'>\n {$contents}\n </div>";
$ret .= $this->getShowField() ? "<div class='fapi-multiform-bar'><span onclick='fapiMultiFormAdd({$this->index})' style='font-size:smaller;cursor:pointer'>Add New</span></div>" : "";
$ret .= "</div>\n <div id='multiform-template-{$this->index}' style='display:none'>\n {$template}\n </div>";
return $ret;
}
示例3: renderContainer
function renderContainer(Container $element, $data, $prefix = '')
{
// Create a new default renderer for the container
$element->render($data, $prefix);
}