Skip to content

Commit

Permalink
API Make ElementalAreaController a subclass of FormSchemaController
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Nov 12, 2024
1 parent cce5110 commit fb79ecb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Controllers/ElementalAreaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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',
Expand Down

0 comments on commit fb79ecb

Please sign in to comment.