Example #1
0
 /**
  * @param string|bool $template
  * @return string
  */
 public function render($template = "")
 {
     if ($template === false) {
         return "";
     }
     if (!$template) {
         $ret = $this->render_prefix() . ($this->parent->should_show_default_values() ? $this->render_default_value() : "") . $this->render_value_field() . $this->render_suffix();
     } else {
         $ret = str_replace(array("%CAPTION", "%DEFAULT", "%VALUE"), array($this->render_prefix(false), $this->render_default_value(false), $this->render_value_field(false)), $template);
         $ret .= $this->render_suffix(false);
     }
     return $ret;
 }