PHP 클래스 Grid_Basic, atk4

상속: extends CompleteLister
파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$app App_Web
$buttonset ButtonSet Grid buttons.
$columns Grid columns
$default_controller Default grid controller
$last_column Pointer to last added grid column
$show_header Should we show header line
$sort_icons jQuery-UI icons to show as sort icons in header

보호된 프로퍼티들

프로퍼티 타입 설명
$no_records_message No records message. See setNoRecords()

공개 메소드들

메소드 설명
addButton ( string | array $label, string $class = 'Button' ) : Button Adds button.
addColumn ( mixed $formatters, string $name = null, string | array $descr = null ) Add column to grid.
addFormatter ( string $field, mixed $formatter, array $options = null ) Add extra formatter to existing field.
applyTDParams ( string $field, SQLite &$row_template = null ) Apply TD parameters in appropriate template.
defaultTemplate ( ) : array Default template.
executeFormatters ( string $field, array $column, string $formatter_prefix = 'format_', boolean $silent = false ) Format field value using appropriate formatters.
formatRow ( ) Format grid row.
format_text ( string $field ) Default formatter.
getColumn ( string $name ) Set column as "last column".
hasColumn ( string $name ) : boolean Check if we have such column.
importFields ( Model $model, array $fields = UNDEFINED ) Import fields using controller.
init ( ) Initialization.
initWidget ( ) You might want Grid to be enchanced with a widget. Initialize it here or define this as empty function to avoid.
precacheTemplate ( ) Precaches template chunks.
removeColumn ( string $name ) Remove column from grid.
renderRows ( ) Render grid rows.
setCaption ( string $name ) Set caption of column.
setFormatter ( string $field, mixed $formatter, $options = null ) Replace current formatter for field.
setNoRecordsMessage ( string $message ) Set message to show when no records are retrieved.

메소드 상세

addButton() 공개 메소드

Adds button.
public addButton ( string | array $label, string $class = 'Button' ) : Button
$label string | array label of button
$class string optional name of button class
리턴 Button

addColumn() 공개 메소드

Add column to grid.
public addColumn ( mixed $formatters, string $name = null, string | array $descr = null )
$formatters mixed
$name string
$descr string | array

addFormatter() 공개 메소드

Add extra formatter to existing field.
public addFormatter ( string $field, mixed $formatter, array $options = null )
$field string
$formatter mixed
$options array

applyTDParams() 공개 메소드

You can pass row template too. That's useful to set up totals rows, for example.
public applyTDParams ( string $field, SQLite &$row_template = null )
$field string Fieldname
$row_template SQLite Optional row template

defaultTemplate() 공개 메소드

Default template.
public defaultTemplate ( ) : array
리턴 array

executeFormatters() 공개 메소드

Format field value using appropriate formatters.
public executeFormatters ( string $field, array $column, string $formatter_prefix = 'format_', boolean $silent = false )
$field string field name
$column array column configuration
$formatter_prefix string prefix of formatter methods
$silent boolean don't throw exception if formatter not found

formatRow() 공개 메소드

Extends formatRow method of CompleteLister
public formatRow ( )

format_text() 공개 메소드

Default formatter.
public format_text ( string $field )
$field string

getColumn() 공개 메소드

Set column as "last column".
public getColumn ( string $name )
$name string

hasColumn() 공개 메소드

Check if we have such column.
public hasColumn ( string $name ) : boolean
$name string
리턴 boolean

importFields() 공개 메소드

Import fields using controller.
public importFields ( Model $model, array $fields = UNDEFINED )
$model Model
$fields array

init() 공개 메소드

Initialization.
public init ( )

initWidget() 공개 메소드

You might want Grid to be enchanced with a widget. Initialize it here or define this as empty function to avoid.
public initWidget ( )

precacheTemplate() 공개 메소드

Precaches template chunks.
public precacheTemplate ( )

removeColumn() 공개 메소드

Remove column from grid.
public removeColumn ( string $name )
$name string

renderRows() 공개 메소드

Extends renderRows method of CompleteLister
public renderRows ( )

setCaption() 공개 메소드

Set caption of column.
public setCaption ( string $name )
$name string

setFormatter() 공개 메소드

Replace current formatter for field.
public setFormatter ( string $field, mixed $formatter, $options = null )
$field string
$formatter mixed

setNoRecordsMessage() 공개 메소드

Set message to show when no records are retrieved.
public setNoRecordsMessage ( string $message )
$message string

프로퍼티 상세

$app 공개적으로 프로퍼티

public App_Web $app
리턴 App_Web

$buttonset 공개적으로 프로퍼티

Grid buttons.
또한 보기: addButton()
public ButtonSet $buttonset
리턴 ButtonSet

$columns 공개적으로 프로퍼티

Grid columns
public $columns

$default_controller 공개적으로 프로퍼티

Default grid controller
public $default_controller

$last_column 공개적으로 프로퍼티

Pointer to last added grid column
public $last_column

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

No records message. See setNoRecords()
protected $no_records_message

$show_header 공개적으로 프로퍼티

Should we show header line
public $show_header

$sort_icons 공개적으로 프로퍼티

jQuery-UI icons to show as sort icons in header
public $sort_icons