From fb79ecbb3b81e4c74e445d5fcc825da1290340e1 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 12 Nov 2024 17:16:26 +1300 Subject: [PATCH] API Make ElementalAreaController a subclass of FormSchemaController --- src/Controllers/ElementalAreaController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Controllers/ElementalAreaController.php b/src/Controllers/ElementalAreaController.php index 899a8ca5..724432db 100644 --- a/src/Controllers/ElementalAreaController.php +++ b/src/Controllers/ElementalAreaController.php @@ -5,7 +5,6 @@ use DNADesign\Elemental\Forms\EditFormFactory; use DNADesign\Elemental\Models\BaseElement; use DNADesign\Elemental\Services\ElementTypeRegistry; -use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\Control\HTTPResponse; use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\Form; @@ -20,18 +19,17 @@ use Exception; use SilverStripe\Control\HTTPRequest; use InvalidArgumentException; +use SilverStripe\Admin\FormSchemaController; /** * Controller for "ElementalArea" - handles loading and saving of in-line edit forms in an elemental area in admin */ -class ElementalAreaController extends CMSMain +class ElementalAreaController extends FormSchemaController { const FORM_NAME_TEMPLATE = 'ElementForm_%s'; private static $url_segment = 'elemental-area'; - private static $ignore_menuitem = true; - private static $url_handlers = [ 'elementForm/$ItemID' => 'elementForm', '$FormName/field/$FieldName' => 'formAction',