class GridFieldDetailForm implements GridField_URLHandler

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(String $template)

No description

String
getTemplate()

No description

setName(String $name)

No description

String
getName()

No description

setValidator(Validator $validator)

No description

getValidator()

No description

setFields(FieldList $fields)

No description

getFields()

No description

setItemRequestClass(String $class)

No description

String
getItemRequestClass()

No description

setItemEditFormCallback(Closure $cb)

No description

getItemEditFormCallback()

No description

Details

at line 52
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

at line 69
__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

at line 79
GridFieldDetailForm_ItemRequest handleItem(GridField $gridField, SS_HTTPRequest $request)

Parameters

GridField $gridField
SS_HTTPRequest $request

Return Value

GridFieldDetailForm_ItemRequest

at line 108
setTemplate(String $template)

Parameters

String $template

at line 116
String getTemplate()

Return Value

String

at line 123
setName(String $name)

Parameters

String $name

at line 131
String getName()

Return Value

String

at line 138
setValidator(Validator $validator)

Parameters

Validator $validator

at line 146
Validator getValidator()

Return Value

Validator

at line 153
setFields(FieldList $fields)

Parameters

FieldList $fields

at line 161
FieldList getFields()

Return Value

FieldList

at line 168
setItemRequestClass(String $class)

Parameters

String $class

at line 176
String getItemRequestClass()

Return Value

String

at line 189
setItemEditFormCallback(Closure $cb)

Parameters

Closure $cb Make changes on the edit form after constructing it.

at line 197
Closure getItemEditFormCallback()

Return Value

Closure