PHP 클래스 OpenSkill\Datatable\Views\DatatableView

파일 보기 프로젝트 열기: openskill/datatable 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string | null $tableView, string | null $scriptView, Illuminate\Contracts\View\Factory $viewFactory, Illuminate\Contracts\Config\Repository $configRepository, array $columnConfiguration = [] ) DatatableView constructor, will take a view as a string if a custom one should be used. will also take the column configurations to provide out of the box headers for the view.
callback ( string $name, string $callback )
columns ( string $columnName, string $label = null ) Will set the columns for the view
endpoint ( $endpoint_url ) Sets the endpoint URL that will be passed to templates when rendering html & scripts.
headers ( ) Indicates that the current columns should have a header on the table
html ( ) : string Will render the table and directly the script after it. This is a shortcut for {@link #table} followed by {@link script}
id ( string $tableId ) Will set a new id on the table.
option ( string $name, mixed $options )
script ( ) : string Will render the javascript for the table
table ( ) : string Will render the table

메소드 상세

__construct() 공개 메소드

If no columns are given the user must provide them before building the view.
public __construct ( string | null $tableView, string | null $scriptView, Illuminate\Contracts\View\Factory $viewFactory, Illuminate\Contracts\Config\Repository $configRepository, array $columnConfiguration = [] )
$tableView string | null the name of the view that should be rendered for the table
$scriptView string | null the name of the view that should be rendered for the script
$viewFactory Illuminate\Contracts\View\Factory The factory used to render the views
$configRepository Illuminate\Contracts\Config\Repository The repository responsible for config resolution
$columnConfiguration array The columnConfiguration of the the server side if available

callback() 공개 메소드

public callback ( string $name, string $callback )
$name string the name of the callback function
$callback string the body of the callback function

columns() 공개 메소드

Will set the columns for the view
public columns ( string $columnName, string $label = null )
$columnName string The name of the column
$label string The label for this column

endpoint() 공개 메소드

Sets the endpoint URL that will be passed to templates when rendering html & scripts.
public endpoint ( $endpoint_url )
$endpoint_url

headers() 공개 메소드

Indicates that the current columns should have a header on the table
public headers ( )

html() 공개 메소드

Will render the table and directly the script after it. This is a shortcut for {@link #table} followed by {@link script}
public html ( ) : string
리턴 string Will return the rendered table and the rendered script as string

id() 공개 메소드

Will set a new id on the table.
public id ( string $tableId )
$tableId string The new id that should be used for the DOM table

option() 공개 메소드

public option ( string $name, mixed $options )
$name string the name of the option
$options mixed an array of options

script() 공개 메소드

Will render the javascript for the table
public script ( ) : string
리턴 string the rendered view that represents the script

table() 공개 메소드

Will render the table
public table ( ) : string
리턴 string the rendered view that represents the table