PHP 트레잇 kartik\grid\ColumnTrait

부터: 1.0
저자: Kartik Visweswaran ([email protected])
파일 보기 프로젝트 열기: kartik-v/yii2-grid

공개 메소드들

메소드 설명
parseExcelFormats ( array &$options, Model $model, mixed $key, integer $index ) Parses Excel Cell Formats for export
renderFilterCell ( ) : string Renders the filter cell.
renderHeaderCell ( ) : string Renders the header cell.
renderPageSummaryCell ( ) : string Renders the page summary cell.

보호된 메소드들

메소드 설명
calculateSummary ( ) : float Calculates the summary of an input data based on page summary aggregration function.
checkValidFilters ( ) Checks if the filter input types are valid
fetchContentOptions ( mixed $model, mixed $key, integer $index ) : array Parses and fetches updated content options for grid visibility and format
getColumnKey ( ) : mixed Generate an unique column key
getFooterCellContent ( ) : string Get the raw footer cell content.
getPageSummaryCellContent ( ) : string Gets the raw page summary cell content.
initGrouping ( ) : void Initializes grid grouping
initPjax ( string $script = '' ) Initialize column specific JS functionality whenever pjax request completes
isValidAlignment ( string $type = 'hAlign' ) : boolean Check if the alignment provided is valid
parseFormat ( ) Parses and formats a grid column
parseGrouping ( array &$options, Model $model, mixed $key, integer $index ) Parses grid grouping and sets data attributes
parseVal ( string | integer | Closur\Closure $var, Model $model, string | object $key, integer $index ) : mixed Parses a value if Closure and returns the right value
parseVisibility ( ) Checks hidden property and hides the column from display
renderPageSummaryCellContent ( ) : string Renders the page summary cell content.
setPageRows ( ) Store all rows for the column for the current page

메소드 상세

calculateSummary() 보호된 메소드

Calculates the summary of an input data based on page summary aggregration function.
protected calculateSummary ( ) : float
리턴 float

checkValidFilters() 보호된 메소드

Checks if the filter input types are valid
protected checkValidFilters ( )

fetchContentOptions() 보호된 메소드

Parses and fetches updated content options for grid visibility and format
protected fetchContentOptions ( mixed $model, mixed $key, integer $index ) : array
$model mixed the data model being rendered
$key mixed the key associated with the data model
$index integer the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
리턴 array

getColumnKey() 보호된 메소드

Generate an unique column key
protected getColumnKey ( ) : mixed
리턴 mixed

getFooterCellContent() 보호된 메소드

Get the raw footer cell content.
protected getFooterCellContent ( ) : string
리턴 string the rendered result

getPageSummaryCellContent() 보호된 메소드

Gets the raw page summary cell content.
protected getPageSummaryCellContent ( ) : string
리턴 string the rendered result

initGrouping() 보호된 메소드

Initializes grid grouping
protected initGrouping ( ) : void
리턴 void

initPjax() 보호된 메소드

Initialize column specific JS functionality whenever pjax request completes
protected initPjax ( string $script = '' )
$script string the js script to be used as a callback

isValidAlignment() 보호된 메소드

Check if the alignment provided is valid
protected isValidAlignment ( string $type = 'hAlign' ) : boolean
$type string the alignment type
리턴 boolean

parseExcelFormats() 공개 메소드

Parses Excel Cell Formats for export
public parseExcelFormats ( array &$options, Model $model, mixed $key, integer $index )
$options array the HTML attributes for the cell
$model yii\base\Model the current model being rendered
$key mixed the primary key value for the model
$index integer the zero-based index of the model being rendered

parseFormat() 보호된 메소드

Parses and formats a grid column
protected parseFormat ( )

parseGrouping() 보호된 메소드

Parses grid grouping and sets data attributes
protected parseGrouping ( array &$options, Model $model, mixed $key, integer $index )
$options array
$model yii\base\Model
$key mixed
$index integer

parseVal() 보호된 메소드

Parses a value if Closure and returns the right value
protected parseVal ( string | integer | Closur\Closure $var, Model $model, string | object $key, integer $index ) : mixed
$var string | integer | Closur\Closure the variable to parse
$model yii\base\Model the model instance
$key string | object the current model key value
$index integer the index of the current record in the data provider
리턴 mixed

parseVisibility() 보호된 메소드

Checks hidden property and hides the column from display
protected parseVisibility ( )

renderFilterCell() 공개 메소드

Renders the filter cell.
public renderFilterCell ( ) : string
리턴 string

renderHeaderCell() 공개 메소드

Renders the header cell.
public renderHeaderCell ( ) : string
리턴 string

renderPageSummaryCell() 공개 메소드

Renders the page summary cell.
public renderPageSummaryCell ( ) : string
리턴 string the rendered result

renderPageSummaryCellContent() 보호된 메소드

Renders the page summary cell content.
protected renderPageSummaryCellContent ( ) : string
리턴 string the rendered result

setPageRows() 보호된 메소드

Store all rows for the column for the current page
protected setPageRows ( )