FEATURE #1373: add history of content

This commit contains only core funcionality of displaying history. Module settings must be implemented in each module.
This commit is contained in:
Michal Kváček
2016-02-05 16:06:13 +01:00
parent 0216d923d4
commit 620a5545d8
12 changed files with 370 additions and 18 deletions
+9 -14
View File
@@ -1,28 +1,23 @@
<?php
namespace App\Handlers;
use App\Models\Content;
use App\Handlers\Contracts\AppHandler;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
/**
* Class Handler
*
* Handler is a class which handles module-specific behaviour which cannot be done by module itself, resp. cannot be done by some abstract magic.
* Handler is a class which handles module-specific behaviour which cannot be done by module itself, resp. cannot be
* done by some abstract magic.
*
* @package App\Handlers
*/
abstract class Handler
abstract class Handler implements AppHandler
{
/**
* Render given module into visitor area.
*
* @param Content $content DB model from table contents
* @param array $parameters parameters used for modifications/custom settings of given model
*
* @return mixed
*/
abstract public function render(Content $content, $parameters);
public static function getHistoryHandler()
{
return History::class;
}
/**
* Register admin menu (or multiple ones)
@@ -34,6 +29,6 @@ abstract class Handler
*/
public static function registerAdminMenu(User $user)
{
//
// core menu is registered in AdminMenuServiceProvider
}
}