PHP Класс GridFieldSortableRows

Наследование: implements GridField_HTMLProvider, implements GridField_ActionProvider, implements GridField_DataManipulator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$append_to_top
$custom_relation_name
$disable_selection
$sortColumn
$update_versioned_stage

Открытые методы

Метод Описание
__construct ( string $sortColumn, boolean $disableSelection = true, string $updateVersionStage = null, string $customRelationName = null )
getActions ( GridField $gridField ) : Array Return a list of the actions handled by this action provider.
getHTMLFragments ( GridField $gridField ) : Array Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
getManipulatedData ( GridField $gridField, SS_List $dataList ) : DataList Manipulate the datalist as needed by this grid modifier.
handleAction ( GridField $gridField, String $actionName, Array $arguments, Array $data ) Handle an action on the given grid field.
setAppendToTop ( boolean $value ) : GridFieldSortableRows Sets if new records should be appended to the top or the bottom of the list
setCustomRelationName ( string $value ) : GridFieldSortableRows Sets the name of the relationship to use, by default the name is determined from the GridField's name
setDisableSelection ( boolean $value ) : GridFieldSortableRows
setUpdateVersionedStage ( string $value ) : GridFieldSortableRows Sets the suffix of the versioned stage that should be updated along side the default stage

Защищенные методы

Метод Описание
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
saveGridRowSort ( GridField $gridField, Array $data ) Handles saving of the row sort order
sortToPage ( GridField $gridField, Array $data ) Handles sorting across pages

Описание методов

__construct() публичный Метод

public __construct ( string $sortColumn, boolean $disableSelection = true, string $updateVersionStage = null, string $customRelationName = null )
$sortColumn string Column that should be used to update the sort information
$disableSelection boolean Disable selection on the GridField when dragging
$updateVersionStage string Name of the versioned stage to update this disabled by default unless this is set
$customRelationName string Name of the relationship to use, if left null the name is determined from the GridField's name

fixSortColumn() защищенный Метод

Detects and corrects items with a sort column value of 0, by appending them to the bottom of the list
protected fixSortColumn ( GridField $gridField, SS_List $dataList )
$gridField GridField Grid Field Reference
$dataList SS_List Data List of items to be checked

getActions() публичный Метод

Return a list of the actions handled by this action provider.
public getActions ( GridField $gridField ) : Array
$gridField GridField Grid Field Reference
Результат Array Array with action identifier strings.

getHTMLFragments() публичный Метод

Returns a map where the keys are fragment names and the values are pieces of HTML to add to these fragments.
public getHTMLFragments ( GridField $gridField ) : Array
$gridField GridField Grid Field Reference
Результат Array 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.
public getManipulatedData ( GridField $gridField, SS_List $dataList ) : DataList
$gridField GridField Grid Field Reference
$dataList SS_List Data List to adjust
Результат DataList Modified Data List

handleAction() публичный Метод

Handle an action on the given grid field.
public handleAction ( GridField $gridField, String $actionName, Array $arguments, Array $data )
$gridField GridField Grid Field Reference
$actionName String Action identifier, see {@link getActions()}.
$arguments Array Arguments relevant for this
$data Array All form data

saveGridRowSort() защищенный Метод

Handles saving of the row sort order
protected saveGridRowSort ( GridField $gridField, Array $data )
$gridField GridField Grid Field Reference
$data Array Data submitted in the request

setAppendToTop() публичный Метод

Sets if new records should be appended to the top or the bottom of the list
public setAppendToTop ( boolean $value ) : GridFieldSortableRows
$value boolean Boolean true to append to the top false to append to the bottom
Результат GridFieldSortableRows Returns the current instance

setCustomRelationName() публичный Метод

Sets the name of the relationship to use, by default the name is determined from the GridField's name
public setCustomRelationName ( string $value ) : GridFieldSortableRows
$value string Name of the relationship to use, by default the name is determined from the GridField's name
Результат GridFieldSortableRows Returns the current instance

setDisableSelection() публичный Метод

public setDisableSelection ( boolean $value ) : GridFieldSortableRows
$value boolean Boolean true to disable selection of table contents false to enable selection
Результат GridFieldSortableRows Returns the current instance

setUpdateVersionedStage() публичный Метод

Sets the suffix of the versioned stage that should be updated along side the default stage
public setUpdateVersionedStage ( string $value ) : GridFieldSortableRows
$value string Versioned Stage to update this is disabled by default unless this is set
Результат GridFieldSortableRows Returns the current instance

sortToPage() защищенный Метод

Handles sorting across pages
protected sortToPage ( GridField $gridField, Array $data )
$gridField GridField Grid Field Reference
$data Array Data submitted in the request

Описание свойств

$append_to_top защищенное свойство

protected $append_to_top

$custom_relation_name защищенное свойство

protected $custom_relation_name

$disable_selection защищенное свойство

protected $disable_selection

$sortColumn защищенное свойство

protected $sortColumn

$update_versioned_stage защищенное свойство

protected $update_versioned_stage