1: <?php
2:
3: namespace Sphp\comp\html{
4:
5: class DisplayError extends \Sphp\tools\Control {
6: private $innerErr = false;
7:
8: public function setInnerError() {
9: $this->innerErr = true;
10: }
11: protected function genhelpPropList() {
12: $this->addHelpPropFunList('setInnerError','Display Inner Error','','');
13: }
14: public function onrender() {
15: $this->tagName = "span";
16: $stro = "";
17: //<strong class="alert-danger">' . $msg . '</strong>
18: $msg = getMsg($this->name);
19: if($msg != ""){
20: $stro .= '<strong class="alert-info">' . $msg . '</strong>';
21: }
22: $emsg = getErrMsg($this->name);
23: $emsg .= getErrMsgInner($this->name);
24: if($emsg != ""){
25: $stro .= '<strong class="alert-danger">' . $emsg . '</strong>';
26: }
27: $this->setInnerHTML($stro);
28: }
29: }
30: }