PHP 클래스 GridFieldAddNewMultiClass, silverstripe-gridfieldextensions

By default the list of classes that are createable is the grid field's model class, and any subclasses. This can be customised using {@link setClasses()}.
상속: implements GridField_HTMLProvider, implements GridField_URLHandler
파일 보기 프로젝트 열기: ajshort/silverstripe-gridfieldextensions 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$itemRequestClass string

공개 메소드들

메소드 설명
__construct ( string $fragment = 'before' )
getClasses ( GridField $grid ) : array Gets the classes that can be created using this button, defaulting to the model class and its subclasses.
getFragment ( ) : string Gets the fragment name this button is rendered into.
getHTMLFragments ( $grid ) {@inheritDoc}
getTitle ( ) : string Gets the button title text.
getURLHandlers ( $grid ) {@inheritDoc}
handleAdd ( GridField $grid, SS_HTTPRequest $request ) : GridFieldAddNewMultiClassHandler Handles adding a new instance of a selected class.
setClasses ( array $classes, $default = null ) : GridFieldAddNewMultiClass Sets the classes that can be created using this button.
setDefaultClass ( string $default ) : GridFieldAddNewMultiClass Sets the default class that is selected automatically.
setFragment ( string $fragment ) : GridFieldAddNewMultiClass Sets the fragment name this button is rendered into.
setItemRequestClass ( $class )
setTitle ( string $title ) : GridFieldAddNewMultiClass Sets the button title text.

메소드 상세

__construct() 공개 메소드

public __construct ( string $fragment = 'before' )
$fragment string the fragment to render the button in

getClasses() 공개 메소드

Gets the classes that can be created using this button, defaulting to the model class and its subclasses.
public getClasses ( GridField $grid ) : array
$grid GridField
리턴 array a map of class name to title

getFragment() 공개 메소드

Gets the fragment name this button is rendered into.
public getFragment ( ) : string
리턴 string

getHTMLFragments() 공개 메소드

{@inheritDoc}
public getHTMLFragments ( $grid )

getTitle() 공개 메소드

Gets the button title text.
public getTitle ( ) : string
리턴 string

getURLHandlers() 공개 메소드

{@inheritDoc}
public getURLHandlers ( $grid )

handleAdd() 공개 메소드

Handles adding a new instance of a selected class.
public handleAdd ( GridField $grid, SS_HTTPRequest $request ) : GridFieldAddNewMultiClassHandler
$grid GridField
$request SS_HTTPRequest
리턴 GridFieldAddNewMultiClassHandler

setClasses() 공개 메소드

Sets the classes that can be created using this button.
public setClasses ( array $classes, $default = null ) : GridFieldAddNewMultiClass
$classes array a set of class names, optionally mapped to titles
리턴 GridFieldAddNewMultiClass $this

setDefaultClass() 공개 메소드

Sets the default class that is selected automatically.
public setDefaultClass ( string $default ) : GridFieldAddNewMultiClass
$default string the class name to use as default
리턴 GridFieldAddNewMultiClass $this

setFragment() 공개 메소드

Sets the fragment name this button is rendered into.
public setFragment ( string $fragment ) : GridFieldAddNewMultiClass
$fragment string
리턴 GridFieldAddNewMultiClass $this

setItemRequestClass() 공개 메소드

public setItemRequestClass ( $class )

setTitle() 공개 메소드

Sets the button title text.
public setTitle ( string $title ) : GridFieldAddNewMultiClass
$title string
리턴 GridFieldAddNewMultiClass $this

프로퍼티 상세

$itemRequestClass 보호되어 있는 프로퍼티

protected string $itemRequestClass
리턴 string