*/ class jfContent extends JTable { /** @var int Primary ke */ var $id=null; /** @var int Reference id for the language */ var $language_id=null; /** @var int Reference id for the original content */ var $reference_id=null; /** @var int Reference table of the original content */ var $reference_table=null; /** @var int Reference field of the original content */ var $reference_field=null; /** @var string translated value*/ var $value=null; /** @var string original value for equals check*/ var $original_value=null; /** @var string original value for equals check*/ var $original_text=null; /** @var int user that checked out the jfContent*/ // var $checked_out=null; // not yet supported /** @var datetime time when the checkout was done*/ // var $checked_out_time=null; // not yet supported /** @var date Date of last modification*/ var $modified=null; /** @var string Last translator*/ var $modified_by=null; /** @var boolean Flag of the translation publishing status*/ var $published=false; /** Standard constructur */ function jfContent( &$db ) { parent::__construct( '#__jf_content', 'id', $db ); } /** * Bind the content of the newValues to the object. Overwrite to make it possible * to use also objects here */ function bind( $newValues ) { if (is_array( $newValues )) { return parent::bind( $newValues ); } else { foreach (get_object_vars($this) as $k => $v) { if ( isset($newValues->$k) ) { $this->$k = $newValues->$k; } } } return true; } /** * Validate language information * Name and Code name are mandatory * activated will automatically set to false if not set */ function check() { if (trim( $this->language_id ) == '') { $this->_error = JText::_('NO_LANGUAGE_DBERROR'); return false; } return true; } function toString() { $retString = "

content field:
"; $retString .= "id=$this->id; language_id=$this->language_id
"; $retString .= "reference_id=$this->reference_id, reference_table=$this->reference_table, reference_field=$this->reference_field
"; $retString .= "value=>" .htmlspecialchars($this->value). "<
"; $retString .= "original_value=>" .htmlspecialchars($this->original_value). "<
"; $retString .="modified=$this->modified, modified_by=$this->modified_by, published=$this->published

"; return $retString; } } ?>