UncleCheese\BetterButtons\Controllers\BetterButtonsNestedFormRequest
Request handler that deals with nested forms
- Author: Uncle Cheese <unclecheese@leftandmain.com>
Synopsis
class BetterButtonsNestedFormRequest
extends BetterButtonsCustomActionRequest
{
- // members
- private static array $allowed_actions = ;
- private static array $url_handlers = ;
- // Inherited members from BetterButtonsCustomActionRequest
- protected GridFieldBetterButtonsItemRequest $parent;
- protected GridFieldDetailForm_ItemRequest $controller;
- protected DataObject $record;
- protected Form $form;
- // methods
- public void Link()
- public Form Form()
- public SSViewer index()
- public HTTPResponse nestedFormSave()
- protected BetterButtonNestedForm getFormActionFromRequest()
- // Inherited methods from BetterButtonsCustomActionRequest
- public void __construct()
- public HTTPResponse handleCustomAction()
Hierarchy
Members
private
- $allowed_actions
—
array
Define the allowed controller actions - $url_handlers
—
array
Define URL routes
protected
- $controller
—
UncleCheese\BetterButtons\Controllers\GridFieldDetailForm_ItemRequest
The parent controller - $form
—
UncleCheese\BetterButtons\Controllers\Form
The Form that is editing the record - $parent
—
UncleCheese\BetterButtons\Controllers\GridFieldBetterButtonsItemRequest
The parent extension. There are actually some useful methods in the extension itself, so we need access to that object - $record
—
UncleCheese\BetterButtons\Controllers\DataObject
The record we're editing
Methods
protected
- getFormActionFromRequest() — Get the action from the request, whether it's part of the form data or in the query string
public
- Form() — Create the nested form
- Link() — Gets a link to this RequestHandler
- index() — Render the form to the template
- nestedFormSave() — Handles the saving of the nested form. This is essentially a proxy method for the method that the BetterButtonNestedForm button has been configured to use
Inherited from UncleCheese\BetterButtons\Controllers\BetterButtonsCustomActionRequest
public
- handleCustomAction() — Takes the action at /customaction/my-action-name and feeds it to the DataObject.