本文整理匯總了PHP中Container::clearErrors方法的典型用法代碼示例。如果您正苦於以下問題:PHP Container::clearErrors方法的具體用法?PHP Container::clearErrors怎麽用?PHP Container::clearErrors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Container
的用法示例。
在下文中一共展示了Container::clearErrors方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
}