UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows
This component provides a checkbox which when checked enables drag-and-drop re-ordering of elements displayed in a {@link GridField}
Synopsis
class GridFieldSortableRows
implements
GridField_HTMLProvider,GridField_ActionProvider,GridField_DataManipulator
{
- // members
- protected $sortColumn;
- protected bool $disable_selection = true;
- protected bool $append_to_top = false;
- protected null|string $update_versioned_stage = NULL;
- protected null|string $custom_relation_name = NULL;
- // methods
- public void __construct()
- public array getHTMLFragments()
- public DataList getManipulatedData()
- public GridFieldSortableRows setAppendToTop()
- public GridFieldSortableRows setDisableSelection()
- public GridFieldSortableRows setUpdateVersionedStage()
- public GridFieldSortableRows setCustomRelationName()
- protected void fixSortColumn()
- public array getActions()
- public void handleAction()
- protected void saveGridRowSort()
- protected void sortToPage()
- public bool hasVersionedExtension()
- public string mapTableNameAndReturn()
Hierarchy
Implements
- SilverStripe\Forms\GridField\GridField_HTMLProvider
- SilverStripe\Forms\GridField\GridField_ActionProvider
- SilverStripe\Forms\GridField\GridField_DataManipulator
Members
protected
- $append_to_top — UndefinedOffset\SortableGridField\Forms\bool
- $custom_relation_name — UndefinedOffset\SortableGridField\Forms\null|string
- $disable_selection — UndefinedOffset\SortableGridField\Forms\bool
- $sortColumn — string
- $update_versioned_stage — UndefinedOffset\SortableGridField\Forms\null|string
Methods
protected
- fixSortColumn() — Detects and corrects items with a sort column value of 0, by appending them to the bottom of the list
- saveGridRowSort() — Handles saving of the row sort order
- sortToPage() — Handles sorting across pages
public
- __construct()
- getActions() — Return a list of the actions handled by this action provider.
- getHTMLFragments() — Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
- getManipulatedData() — Manipulate the datalist as needed by this grid modifier.
- handleAction() — Handle an action on the given grid field.
- hasVersionedExtension() — Check to see if the given class name has the Versioned extension
- mapTableNameAndReturn() — Checks to see if $table_name is declared on the DataObject, if not returns string as given
- setAppendToTop() — Sets if new records should be appended to the top or the bottom of the list
- setCustomRelationName() — Sets the name of the relationship to use, by default the name is determined from the GridField's name
- setDisableSelection()
- setUpdateVersionedStage() — Sets the suffix of the versioned stage that should be updated along side the default stage