Skip to content

Commit

Permalink
Backporting a few of the versioning classes to ease transition from 3…
Browse files Browse the repository at this point in the history
….x to 4.0
  • Loading branch information
Hackwar committed Jan 8, 2019
1 parent 4d1e0c2 commit 70c43f8
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
21 changes: 21 additions & 0 deletions libraries/src/Versioning/VersionableControllerTrait.php
@@ -0,0 +1,21 @@
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\CMS\Versioning;

defined('JPATH_PLATFORM') or die;

/**
* Defines the trait for a Versionable Controller Class.
* Note: This is a placeholder to ease transition to the new system in 4.0
*
* @since __DEPLOY_VERSION__
*/
trait VersionableControllerTrait
{
}
21 changes: 21 additions & 0 deletions libraries/src/Versioning/VersionableModelTrait.php
@@ -0,0 +1,21 @@
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\CMS\Versioning;

defined('JPATH_PLATFORM') or die;

/**
* Defines the trait for a Versionable Model Class.
* Note: This is a placeholder to ease transition to the new system in 4.0
*
* @since __DEPLOY_VERSION__
*/
trait VersionableModelTrait
{
}
33 changes: 33 additions & 0 deletions libraries/src/Versioning/VersionableTableInterface.php
@@ -0,0 +1,33 @@
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\CMS\Versioning;

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Table\TableInterface;

/**
* Interface for a versionable Table class
*
* @since __DEPLOY_VERSION__
*/
interface VersionableTableInterface extends TableInterface
{
/**
* Get the type alias for the history table
*
* The type alias generally is the internal component name with the
* content type. Ex.: com_content.article
*
* @return string The alias as described above
*
* @since __DEPLOY_VERSION__
*/
public function getTypeAlias();
}

0 comments on commit 70c43f8

Please sign in to comment.