CoreFiles by mySites.guru
VersionableModelInterface.php58 lines, 1,451 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
31b8f0ce33735dce702d7914bf7925f1
sha1
5c12ec2fc01dee6ae86e8ca9dfad3f8cc293744b
sha256
83ae312c1c9ad493fc4e5c004f34b62e95931af4dc786cab53faac5f9402d594
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2025 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Versioning;

// phpcs:disable PSR1.Files.SideEffects

\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Interface for a versionable model.
 *
 * @since  6.0.0
 */
interface VersionableModelInterface
{
    /**
     * Method to load a row for editing from the version history table.
     *
     * @param   integer  $historyId  Key to the version history table.
     *
     * @return  boolean  False on failure or error, true otherwise.
     *
     * @since   6.0.0
     */
    public function loadHistory(int $historyId);

    /**
     * Method to save the history.
     *
     * @param   array   $data     The form data.
     * @param   string  $context  The model context.
     *
     * @return  boolean  True on success, False on error.
     *
     * @since   6.0.0
     */
    public function saveHistory(array $data, string $context);

    /**
     * Method to delete the history for an item.
     *
     * @param   string   $typeAlias  Typealias of the content type
     * @param   integer  $id         ID of the content item to delete
     *
     * @return  boolean  true on success, otherwise false.
     *
     * @since   6.0.0
     */
    public function deleteHistory($typeAlias, $id);
}

The same content is in 39 releases, Joomla 6.0.0 to 6.2.0. See them all, or every version of this file.