Back to Joomla project (class list)

Class Versioning - list of methods

Handle the versioning of content items
Package: Joomla\CMS\Versioning
Copyright: (C) 2020 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Versioning/Versioning.php
Project: Joomla

Method Summary

public static object[]
(mixed $typeAlias, mixed $id)

Method to get a list of available versions of this item.
Parameters
  • string $typeAlias Typealias of the component
  • int $id ID of the content item to get
Returns
  • object[] A list of history items
Since
  • 4.0.0
Show source code of this method: get Source Code

public static bool
(mixed $typeAlias, mixed $id)

Method to delete the history for an item.
Parameters
  • string $typeAlias Typealias of the component
  • int $id ID of the content item to delete
Returns
  • bool true on success, otherwise false.
Since
  • 4.0.0
Show source code of this method: delete Source Code

public static bool
(mixed $typeAlias, mixed $id, mixed $data, mixed $note = '')

Method to save a version snapshot to the content history table.
Parameters
  • string $typeAlias Typealias of the content type
  • int $id ID of the content item
  • mixed $data Array or object of data that can be en- and decoded into JSON
  • string $note Note for the version to store
Returns
  • bool True on success, otherwise false.
Since
  • 4.0.0
Show source code of this method: store Source Code

Tags Summary

Since
4.0.0