Back to Joomla project (class list)

Class ContentHistory - list of methods

Content History table.

Extends

Package: Joomla\CMS\Table
Copyright: (C) 2013 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Table/ContentHistory.php
Project: Joomla

Method Summary

public
(\Joomla\Database\DatabaseDriver $db)

Constructor
Parameters
  • \Joomla\Database\DatabaseDriver $db A database connector object
Since
  • 3.1
Show source code of this method: __construct Source Code

public bool
(mixed $updateNulls = false)

Overrides Table::store to set modified hash, user id, and save date.
Parameters
  • bool $updateNulls True to update fields even if they are null.
Returns
  • bool True on success.
Since
  • 3.2
Show source code of this method: store Source Code

public string
(mixed $jsonData, \Joomla\CMS\Table\ContentType $typeTable)

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).
Parameters
  • mixed $jsonData Either an object or a string with json-encoded data
  • \Joomla\CMS\Table\ContentType $typeTable Table object with data for this content type
Returns
  • string SHA1 hash on success. Empty string on failure.
Since
  • 3.2
Show source code of this method: getSha1 Source Code

public string
()

Utility method to get a matching row based on the hash value and id columns.
Returns
  • string SHA1 hash on success. Empty string on failure.
Since
  • 3.2
Show source code of this method: getHashMatch Source Code

public bool
(mixed $maxVersions)

Utility method to remove the oldest versions of an item, saving only the most recent versions.
Parameters
  • int $maxVersions The maximum number of versions to save. All others will be deleted.
Returns
  • bool true on success, false on failure.
Since
  • 3.2
Show source code of this method: deleteOldVersions Source Code

Properties Summary

public array
$ignoreChanges
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
public array
$convertToInt
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.
Since
  • 3.2

Tags Summary

Since
3.2