.
*/
class Staple_Form_ButtonElement extends Staple_Form_Element
{
public function __construct($name, $value=NULL, $label = NULL, $id = NULL, array $attrib = array())
{
parent::__construct($name,$label,$id,$attrib);
if(isset($value))
{
$this->value = $value;
}
}
/* (non-PHPdoc)
* @see Staple_Form_Element::field()
*/
public function field()
{
return ' getAttribString().">\n";
}
/* (non-PHPdoc)
* @see Staple_Form_Element::label()
*/
public function label()
{
return " \n";
}
public function build()
{
$buf = '';
$view = FORMS_ROOT.'/fields/SubmitElement.phtml';
if(file_exists($view))
{
ob_start();
include $view;
$buf = ob_get_contents();
ob_end_clean();
}
else
{
$buf .= $this->field();
}
return $buf;
}
}