field. */ class ezcWgTplFormHiddenElement extends ezcWgFormFieldElement { private $properties = array(); public function __construct( ezcWgWidget $parent, ezcWgFormWidget $form, $value = '', ezcWgTplSingleInputFilter $filter = null ) { parent::__construct( $parent, $form, "text_element" ); $this->value = $value; $this->filter = $filter; } /** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException if the property does not exist. * @param string $name * @param mixed $value * @ignore */ public function __set( $name, $value ) { switch ( $name ) { case 'value': case 'filter': $this->properties[$name] = $value; break; default: parent::__set( $name, $value ); break; } } /** * Returns the property $name. * * @throws ezcBasePropertyNotFoundException if the property does not exist. * @param string $name * @return mixed * @ignore */ public function __get( $name ) { switch ( $name ) { case 'value': case 'filter': return isset( $this->properties[$name] ) ? $this->properties[$name] : null; break; default: return parent::__get( $name ); break; } } public function render() { return "name}\" type=\"hidden\" value=\"{$this->value}\" />"; } public function dataRetrievedEvent( ezcWgFormEvent $e ) { // check if it is for us if( $e instanceof ezcWgFormEvent ) { // this was trickled to us, so we know it is for this form. if( $this->filter !== null ) { } else // default { $this->value = $_POST[$this->name]; $this->isValid = true; } } } } ?>