/** * Setter for type. * * @param string $type The type to set * * @author Benjamin Carl <*****@*****.**> */ public function setType($type) { $this->type = $type; parent::setType($type); }
/** * Setter for value. * * @param string $value The value to set * @param string $submittedValue The value which was submitted * * @author Benjamin Carl <*****@*****.**> */ public function setValue($value, $submittedValue = null) { if ($submittedValue !== null && is_array($submittedValue)) { $submittedValue = $submittedValue[0]; if ($submittedValue === $value) { $this->check(); } } return parent::setValue($value); }
/** * Constructor. * * @param Doozr_Form_Service_Renderer_Interface $renderer Renderer instance for rendering this component * @param Doozr_Form_Service_Validator_Interface $validator Validator instance for validating this component * * @author Benjamin Carl <*****@*****.**> * * @return \Doozr_Form_Service_Component_Text */ public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, Doozr_Form_Service_Validator_Interface $validator = null) { $this->setType('text'); // Important call so observer storage ... can be initiated parent::__construct($renderer, $validator); }
/** * Constructor. * * @param Doozr_Form_Service_Renderer_Interface $renderer Renderer instance for rendering this component * @param Doozr_Form_Service_Validator_Interface $validator Validator instance for validating this component * * @author Benjamin Carl <*****@*****.**> * * @return \Doozr_Form_Service_Component_Hidden */ public function __construct(Doozr_Form_Service_Renderer_Interface $renderer = null, Doozr_Form_Service_Validator_Interface $validator = null) { $this->setType('hidden'); parent::__construct($renderer, $validator); }