Свойство | Тип | Описание | |
---|---|---|---|
$extraSortFields | string | array | Extra sort fields to apply before the sort field. | |
$immediateUpdate | boolean | If set to true, when an item is re-ordered, it will update on the database and refresh the gridfield. When set to false, it will only update the sort order when the record is saved. | |
$reorderColumnNumber | integer | The number of the column containing the reorder handles | |
$sortField | string | The database field which specifies the sort, defaults to "Sort". |
Метод | Описание | |
---|---|---|
__construct ( string $sortField = 'Sort' ) | ||
augmentColumns ( $grid, &$cols ) | ||
getColumnAttributes ( $grid, $record, $col ) | ||
getColumnContent ( $grid, $record, $col ) | ||
getColumnMetadata ( $grid, $col ) | ||
getColumnsHandled ( $grid ) | ||
getExtraSortFields ( ) : string | array | ||
getHTMLFragments ( GridField $field ) | ||
getImmediateUpdate ( ) : boolean | ||
getManipulatedData ( GridField $grid, SS_List $list ) | ||
getReorderColumnNumber ( ) : integer | ||
getSortField ( ) : string | ||
getSortTable ( SS_List $list ) : string | Gets the table which contains the sort field. | |
getURLHandlers ( $grid ) | ||
handleMoveToPage ( GridField $grid, $request ) | Handles requests to move an item to the previous or next page. | |
handleReorder ( GridField $grid, SS_HTTPRequest $request ) : SS_HTTPResponse | Handles requests to reorder a set of IDs in a specific order. | |
handleSave ( GridField $grid, DataObjectInterface $record ) | Handle saving when 'immediateUpdate' is disabled, otherwise this isn't necessary for the default sort mode. | |
setExtraSortFields ( string | array $fields ) : GridFieldOrderableRows | Sets extra sort fields to apply before the sort field. | |
setImmediateUpdate ( $bool ) : GridFieldOrderableRows | ||
setReorderColumnNumber ( integer $colno ) : GridFieldOrderableRows | Sets the number of the column containing the reorder handles. | |
setSortField ( $field ) : GridFieldOrderableRows | Sets the field used to specify the sort. |
Метод | Описание | |
---|---|---|
executeReorder ( GridField $grid, array $sortedIDs ) : boolean | ||
getSortTableClauseForIds ( DataList $list, $ids ) | ||
getSortedIDs ( array $data ) : array | Get mapping of sort value to ID from posted data | |
populateSortValues ( DataList $list ) | ||
reorderItems ( $list, array $values, array $sortedIDs ) |
protected executeReorder ( GridField $grid, array $sortedIDs ) : boolean | ||
$grid | GridField | |
$sortedIDs | array | List of IDS, where the key is the sort field value to save |
Результат | boolean |
public getExtraSortFields ( ) : string | array | ||
Результат | string | array |
public getManipulatedData ( GridField $grid, SS_List $list ) | ||
$grid | GridField | |
$list | SS_List |
public getReorderColumnNumber ( ) : integer | ||
Результат | integer |
public getSortTable ( SS_List $list ) : string | ||
$list | SS_List | |
Результат | string |
protected getSortTableClauseForIds ( DataList $list, $ids ) | ||
$list | DataList |
protected getSortedIDs ( array $data ) : array | ||
$data | array | Raw posted data |
Результат | array |
public handleMoveToPage ( GridField $grid, $request ) | ||
$grid | GridField |
public handleReorder ( GridField $grid, SS_HTTPRequest $request ) : SS_HTTPResponse | ||
$grid | GridField | |
$request | SS_HTTPRequest | |
Результат | SS_HTTPResponse |
public handleSave ( GridField $grid, DataObjectInterface $record ) | ||
$grid | GridField | |
$record | DataObjectInterface |
protected populateSortValues ( DataList $list ) | ||
$list | DataList |
protected reorderItems ( $list, array $values, array $sortedIDs ) | ||
$values | array | |
$sortedIDs | array |
public setExtraSortFields ( string | array $fields ) : GridFieldOrderableRows | ||
$fields | string | array | |
Результат | GridFieldOrderableRows | $this |
public setImmediateUpdate ( $bool ) : GridFieldOrderableRows | ||
Результат | GridFieldOrderableRows | $this |
public setReorderColumnNumber ( integer $colno ) : GridFieldOrderableRows | ||
$colno | integer | |
Результат | GridFieldOrderableRows | $this |
public setSortField ( $field ) : GridFieldOrderableRows | ||
Результат | GridFieldOrderableRows | $this |
protected bool $immediateUpdate | ||
Результат | boolean |
protected int $reorderColumnNumber | ||
Результат | integer |
protected string $sortField | ||
Результат | string |