Class JTableContenthistory

Description

Content History table.

  • since: 3.2

Located in /libraries/cms/table/contenthistory.php (line 19)

JObject
   |
   --JTable
      |
      --JTableContenthistory
Variable Summary
Method Summary
 JTableContenthistory __construct (JDatabaseDriver $db)
 boolean deleteOldVersions (integer $maxVersions)
 string getHashMatch ()
 string getSha1 (mixed $jsonData, JTableContenttype $typeTable)
 boolean store ([boolean $updateNulls = false])
Variables
array $convertToInt = array() (line 39)

Array of object fields to convert to integers before calculating SHA1 hash. Some values are stored differently when an item is created than when the item is changed and saved. This works around that issue.

This can be read from the #__content_types content_history_options column.

  • since: 3.2
  • access: public
array $ignoreChanges = array() (line 29)

Array of object fields to unset from the data object before calculating SHA1 hash. This allows us to detect a meaningful change in the database row using the hash. This can be read from the #__content_types content_history_options column.

  • since: 3.2
  • access: public

Inherited Variables

Inherited from JTable

JTable::$_autoincrement
JTable::$_db
JTable::$_locked
JTable::$_observers
JTable::$_rules
JTable::$_tbl
JTable::$_tbl_key
JTable::$_tbl_keys
JTable::$_trackAssets

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 48)

Constructor

  • since: 3.1
  • access: public
JTableContenthistory __construct (JDatabaseDriver $db)

Redefinition of:
JTable::__construct()
Object constructor to set table and key fields. In most cases this will be overridden by child classes to explicitly set the table and key fields for a particular database table.
deleteOldVersions (line 176)

Utility method to remove the oldest versions of an item, saving only the most recent versions.

  • return: true on sucess, false on failure.
  • since: 3.2
  • access: public
boolean deleteOldVersions (integer $maxVersions)
  • integer $maxVersions: The maximum number of versions to save. All others will be deleted.
getHashMatch (line 153)

Utility method to get a matching row based on the hash value and id columns.

This lets us check to make sure we don't save duplicate versions.

  • return: SHA1 hash on sucess. Empty string on failure.
  • since: 3.2
  • access: public
string getHashMatch ()
getSha1 (line 92)

Utility method to get the hash after removing selected values. This lets us detect changes other than modified date (which will change on every save).

  • return: SHA1 hash on sucess. Empty string on failure.
  • since: 3.2
  • access: public
string getSha1 (mixed $jsonData, JTableContenttype $typeTable)
  • mixed $jsonData: Either an object or a string with json-encoded data
  • JTableContenttype $typeTable: Table object with data for this content type
store (line 64)

Overrides JTable::store to set modified hash, user id, and save date.

  • return: True on success.
  • since: 3.2
  • access: public
boolean store ([boolean $updateNulls = false])
  • boolean $updateNulls: True to update fields even if they are null.

Redefinition of:
JTable::store()
Method to store a row in the database from the JTable instance properties.

Inherited Methods

Inherited From JTable

 JTable::__construct()
 JTable::addIncludePath()
 JTable::appendPrimaryKeys()
 JTable::attachObserver()
 JTable::bind()
 JTable::check()
 JTable::checkIn()
 JTable::checkOut()
 JTable::delete()
 JTable::getDbo()
 JTable::getFields()
 JTable::getInstance()
 JTable::getKeyName()
 JTable::getNextOrder()
 JTable::getObserverOfClass()
 JTable::getPrimaryKey()
 JTable::getRules()
 JTable::getTableName()
 JTable::hasPrimaryKey()
 JTable::hit()
 JTable::isCheckedOut()
 JTable::load()
 JTable::move()
 JTable::publish()
 JTable::reorder()
 JTable::reset()
 JTable::save()
 JTable::setDBO()
 JTable::setRules()
 JTable::store()
 JTable::_getAssetName()
 JTable::_getAssetParentId()
 JTable::_getAssetTitle()
 JTable::_lock()
 JTable::_unlock()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 14:56:58 +0100 by phpDocumentor 1.4.3