From 50749990e8cbb3d3fd23035433b1f7ec9cf1c4d1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:44:55 +1300 Subject: [PATCH] API Make HistoryViewerController a subclass of FormSchemaController (#369) --- src/Controllers/HistoryViewerController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Controllers/HistoryViewerController.php b/src/Controllers/HistoryViewerController.php index 5ba9ffc..8a5280d 100644 --- a/src/Controllers/HistoryViewerController.php +++ b/src/Controllers/HistoryViewerController.php @@ -3,7 +3,7 @@ namespace SilverStripe\VersionedAdmin\Controllers; use InvalidArgumentException; -use SilverStripe\Admin\LeftAndMain; +use SilverStripe\Admin\FormSchemaController; use SilverStripe\Admin\LeftAndMainFormRequestHandler; use SilverStripe\Control\HTTPRequest; use SilverStripe\Control\HTTPResponse; @@ -22,7 +22,7 @@ * The HistoryViewerController provides AJAX endpoints for React to enable functionality, such as retrieving the form * schema. */ -class HistoryViewerController extends LeftAndMain +class HistoryViewerController extends FormSchemaController { /** * @var string @@ -42,8 +42,6 @@ class HistoryViewerController extends LeftAndMain private static $required_permission_codes = 'CMS_ACCESS_CMSMain'; - private static $ignore_menuitem = true; - private static array $url_handlers = [ 'GET api/read' => 'apiRead', 'POST api/revert' => 'apiRevert',