[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Table/ -> ContentHistory.php (summary)

Joomla! Content Management System

Copyright: (C) 2013 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 223 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ContentHistory:: (5 methods):
  __construct()
  store()
  getSha1()
  getHashMatch()
  deleteOldVersions()


Class: ContentHistory  - X-Ref

Content History table.

__construct(DatabaseDriver $db)   X-Ref
Constructor

param: DatabaseDriver  $db  A database connector object

store($updateNulls = false)   X-Ref
Overrides Table::store to set modified hash, user id, and save date.

param: boolean  $updateNulls  True to update fields even if they are null.
return: boolean  True on success.

getSha1($jsonData, ContentType $typeTable)   X-Ref
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).

param: mixed        $jsonData   Either an object or a string with json-encoded data
param: ContentType  $typeTable  Table object with data for this content type
return: string  SHA1 hash on success. Empty string on failure.

getHashMatch()   X-Ref
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: string  SHA1 hash on success. Empty string on failure.

deleteOldVersions($maxVersions)   X-Ref
Utility method to remove the oldest versions of an item, saving only the most recent versions.

param: integer  $maxVersions  The maximum number of versions to save. All others will be deleted.
return: boolean   true on success, false on failure.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer