PHP 클래스 GridFieldSortableRows

상속: implements GridField_HTMLProvider, implements GridField_ActionProvider, implements GridField_DataManipulator
파일 보기 프로젝트 열기: undefinedoffset/sortablegridfield 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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