GridFieldSortableRows
class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionProvider, GridField_DataManipulator (View source)
This component provides a checkbox which when checked enables drag-and-drop re-ordering of elements displayed in a GridField
Properties
protected | $sortColumn | |||
protected | $disable_selection | |||
protected | $append_to_top | |||
protected | $update_versioned_stage | |||
protected | $custom_relation_name |
Methods
No description
Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
Manipulate the datalist as needed by this grid modifier.
Sets if new records should be appended to the top or the bottom of the list
Sets the suffix of the versioned stage that should be updated along side the default stage
Sets the name of the relationship to use, by default the name is determined from the GridField's name
Detects and corrects items with a sort column value of 0, by appending them to the bottom of the list
Handle an action on the given grid field.
Details
__construct(string $sortColumn, bool $disableSelection = true, string $updateVersionStage = null, string $customRelationName = null)
No description
array
getHTMLFragments($gridField)
Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
DataList
getManipulatedData(GridField $gridField, SS_List $dataList)
Manipulate the datalist as needed by this grid modifier.
GridFieldSortableRows
setAppendToTop(bool $value)
Sets if new records should be appended to the top or the bottom of the list
GridFieldSortableRows
setDisableSelection(bool $value)
No description
GridFieldSortableRows
setUpdateVersionedStage(string $value)
Sets the suffix of the versioned stage that should be updated along side the default stage
GridFieldSortableRows
setCustomRelationName(string $value)
Sets the name of the relationship to use, by default the name is determined from the GridField's name
protected
fixSortColumn(GridField $gridField, SS_List $dataList)
Detects and corrects items with a sort column value of 0, by appending them to the bottom of the list
array
getActions($gridField)
Return a list of the actions handled by this action provider.
handleAction(GridField $gridField, $actionName, $arguments, $data)
Handle an action on the given grid field.
protected
saveGridRowSort(GridField $gridField, array $data)
Handles saving of the row sort order
protected
sortToPage(GridField $gridField, array $data)
Handles sorting across pages