form field. */ class ezcWgTplFormTextAreaElement extends ezcWgFormFieldElement { private $properties = array(); public function __construct( ezcWgWidget $parent, ezcWgFormWidget $form, $rows, $cols, $value = '' ) { parent::__construct( $parent, $form, "text_area_element" ); $this->value = $value; $this->rows = $rows; $this->cols = $cols; } /** * 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 'rows': case 'cols': 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 'rows': case 'cols': case 'filter': return isset( $this->properties[$name] ) ? $this->properties[$name] : null; break; default: return parent::__get( $name ); break; } } public function render() { return ""; } public function dataRetrievedEvent( ezcWgFormEvent $e ) { if( $this->filter !== null ) { } else // default { $this->value = $_POST[$this->name]; $this->isValid = true; } } } ?>