function Display() { $html = $this->_loadTemplate(); $html = str_replace("#LABEL#", $this->label, $html); $html = str_replace("#NOMBRE#", $this->nombre, $html); $html = str_replace("#ID#", $this->id, $html); $html = str_replace("#SELECTED_VALUE#", $this->selected_value, $html); $html = str_replace("#OPTIONS#", parent::Display(), $html); return $html; }
function Display() { $html = $this->_loadTemplate(); $html = str_replace("#NOMBRE#", $this->nombre, $html); $html = str_replace("#TITULO#", $this->titulo, $html); $html_choises = ""; foreach ($this->options as $opt) { $ch = new Choise($opt['value'], $opt['label'], $opt['checked']); $html_choises .= $ch->Display() . "<br/>"; } $html_choises = str_replace("#NOMBRE#", $this->nombre, $html_choises); $html = str_replace("#CONTENT#", $html_choises, $html); //$html = str_replace("#SELECTED_VALUE#", $this->selected_value, $html); $html = str_replace("#OPTIONS#", parent::Display(), $html); return $html; }