class GridFieldDetailForm implements GridField_URLHandler (View source)

Provides view and edit forms at GridField-specific URLs.

These can be placed into pop-ups by an appropriate front-end.

Usually added to a {@link GridField} alongside of a {@link GridFieldEditButton} which takes care of linking the individual rows to their edit view.

The URLs provided will be off the following form:

  • /field//item/
  • /field//item//edit

Methods

getURLHandlers($gridField)

Return URLs to be handled by this grid field, in an array the same form as $url_handlers.

__construct(string $name = 'DetailForm')

Create a popup component. The two arguments will specify how the popup form's HTML and behaviour is created. The given controller will be customised, putting the edit form into the template with the given name.

setTemplate($template)

No description

string
getTemplate()

No description

setName($name)

No description

string
getName()

No description

setValidator(Validator $validator)

No description

getValidator()

No description

setFields(FieldList $fields)

No description

getFields()

No description

setItemRequestClass($class)

No description

string
getItemRequestClass()

No description

setItemEditFormCallback(Closure $cb)

No description

getItemEditFormCallback()

No description

Details

getURLHandlers($gridField)

Return URLs to be handled by this grid field, in an array the same form as $url_handlers.

Handler methods will be called on the component, rather than the {@link GridField}.

Parameters

$gridField

__construct(string $name = 'DetailForm')

Create a popup component. The two arguments will specify how the popup form's HTML and behaviour is created. The given controller will be customised, putting the edit form into the template with the given name.

The arguments are experimental API's to support partial content to be passed back to whatever controller who wants to display the getCMSFields

Parameters

string $name

The name of the edit form to place into the pop-up form

GridFieldDetailForm_ItemRequest handleItem(GridField $gridField, SS_HTTPRequest $request)

Parameters

GridField $gridField
SS_HTTPRequest $request

Return Value

GridFieldDetailForm_ItemRequest

setTemplate($template)

Parameters

$template

string getTemplate()

Return Value

string

setName($name)

Parameters

$name

string getName()

Return Value

string

setValidator(Validator $validator)

Parameters

Validator $validator

Validator getValidator()

Return Value

Validator

setFields(FieldList $fields)

Parameters

FieldList $fields

FieldList getFields()

Return Value

FieldList

setItemRequestClass($class)

Parameters

$class

string getItemRequestClass()

Return Value

string

setItemEditFormCallback(Closure $cb)

Parameters

Closure $cb

Make changes on the edit form after constructing it.

Closure getItemEditFormCallback()

Return Value

Closure