*/ class ContentElementTablefield { var $Type=''; var $Name=''; var $Lable=''; var $Translate=false; var $Option=''; var $Length=30; var $MaxLength=80; var $Rows=15; var $Columns=30; var $posthandler=""; // Can be boolean or array, if boolean defines if the buttons are displayed, if array defines a list of buttons not to show. var $ebuttons=true; // boolean to determine where to show this field if original is not blank e.g. content in modules var $ignoreifblank=0; /** originalValue value of the corresponding content table */ var $originalValue; /** translationContent reference to the actual translation db object */ var $translationContent; /** changed Flag that says if a field is changed or not */ var $changed=false; /** this Flag explains if the original is empty or not */ var $originalEmpty=false; /** Standard constructur */ function ContentElementTablefield( $tablefieldElement ) { $this->Type = trim( $tablefieldElement->getAttribute( 'type' ) ); $this->Name = trim( $tablefieldElement->getAttribute( 'name' ) ); $this->Lable = trim( $tablefieldElement->getText() ); $this->Translate = trim( $tablefieldElement->getAttribute( 'translate' ) ); $this->Option = trim( $tablefieldElement->getAttribute( 'option' ) ); $this->Length = intval( $tablefieldElement->getAttribute( 'length' ) ); $this->MaxLength = intval( $tablefieldElement->getAttribute( 'maxlength' ) ); $this->Rows = intval( $tablefieldElement->getAttribute( 'rows' ) ); $this->Columns = intval( $tablefieldElement->getAttribute( 'columns' ) ); $this->posthandler = trim( $tablefieldElement->getAttribute( 'posthandler' ) ); $this->ignoreifblank = intval( $tablefieldElement->getAttribute( 'ignoreifblank' ) ); $this->ebuttons = trim( $tablefieldElement->getAttribute( 'ebuttons' ) ); if (strpos($this->ebuttons,",")>0){ $this->ebuttons = explode(",",$this->ebuttons); } else if ($this->ebuttons=="1" || strtolower($this->ebuttons)=="true"){ $this->ebuttons = true; } else if (strlen($this->ebuttons)==0) { $this->ebuttons = array("readmore"); } else if ($this->ebuttons=="0" || strtolower($this->ebuttons)=="false"){ $this->ebuttons = false; } else if (strlen($this->ebuttons)>0){ $this->ebuttons = array($this->ebuttons); } } } ?>