CoreFiles by mySites.guru
VersionableModelInterface.php46 lines, 1,094 bytes, from Joomla_6.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 6.0.0-beta2
md5
77b33b3299674ff83765919976ed2109
sha1
0caa4a00e935c885713cfe9bf15a8a876b842ca1
sha256
1787873e1fe5e3816e4840aa41243ce1a67d5ff3ce589190fc15f4bbae17d011
<?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);
}

The same content is in 5 releases, Joomla 6.0.0-beta3 to 6.0.0-rc4. See them all, or every version of this file.