Heyday\VersionedDataObjects\VersionedGridFieldOrderableRows
Class VersionedGridFieldOrderableRows
Allows grid field rows to be re-ordered via drag and drop. Both normal data
lists and many many lists can be ordered.
If the grid field has not been sorted, this component will sort the data by
the sort field.
Synopsis
class VersionedGridFieldOrderableRows
extends RequestHandler
implements
GridField_ColumnProvider,GridField_DataManipulator,GridField_HTMLProvider,GridField_URLHandler
{
- // members
- private static array $allowed_actions = ;
- protected $sortField;
- // methods
- public void __construct()
- public string getSortField()
- public VersionedGridFieldOrderableRows setSortField()
- public mixed getSortTable()
- public void getURLHandlers()
- public array getHTMLFragments()
- public void augmentColumns()
- public array getColumnsHandled()
- public string getColumnContent()
- public array getColumnAttributes()
- public array getColumnMetadata()
- public DataList getManipulatedData()
- public mixed handleReorder()
- public mixed handleMoveToPage()
- protected void reorderItems()
- protected void extendItems()
- protected void populateSortValues()
- protected string getSortTableClauseForIds()
Hierarchy
Extends
- RequestHandler
Implements
- GridField_ColumnProvider
- GridField_DataManipulator
- GridField_HTMLProvider
- GridField_URLHandler
Members
private
- $allowed_actions — array
protected
- $sortField
—
string
The database field which specifies the sort, defaults to "Sort".
Methods
protected
public
- __construct()
- augmentColumns() — Modify the list of columns displayed in the table.
- getColumnAttributes() — Attributes for the element containing the content returned by {@link getColumnContent()}.
- getColumnContent() — HTML for the column, content of the <td> element.
- getColumnMetadata() — Additional metadata about the column which can be used by other components, e.g. to set a title for a search column header.
- getColumnsHandled() — Names of all columns which are affected by this component.
- 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 {@link DataList} as needed by this grid modifier.
- getSortField()
- getSortTable() — Gets the table which contains the sort field.
- getURLHandlers() — Return URLs to be handled by this grid field, in an array the same form as $url_handlers.
- handleMoveToPage() — Handles requests to move an item to the previous or next page.
- handleReorder() — Handles requests to reorder a set of IDs in a specific order.
- setSortField() — Sets the field used to specify the sort.