PHP Класс Prado\Data\ActiveRecord\Scaffold\TScaffoldListView

The {@link getHeader Header} property is a TRepeater displaying the Active Record property/field names. The {@link getSort Sort} property is a drop down list displaying the combination of properties and its possible ordering. The {@link getPager Pager} property is a TPager control displaying the links and/or buttons that navigate to different pages in the Active Record data. The {@link getList List} property is a TRepeater that renders a row of Active Record data. Custom rendering of the each Active Record can be achieved by specifying the ItemTemplate or AlternatingItemTemplate property of the main {@linnk getList List} repeater. The TScaffoldListView will listen for two command events named "delete" and "edit". A "delete" command will delete a the record for the row where the "delete" command is originates. An "edit" command will push the record data to be edited by a TScaffoldEditView with ID specified by the {@link setEditViewID EditViewID}. Additional {@link setSearchCondition SearchCondition} and {@link setSearchParameters SearchParameters} (takes array values) can be specified to customize the records to be shown. The {@link setSearchCondition SearchCondition} will be used as the Condition property of TActiveRecordCriteria, and similarly the {@link setSearchParameters SearchParameters} will be the corresponding Parameters property of TActiveRecordCriteria.
С версии: 3.1
Наследование: extends TScaffoldBase
Показать файл Открыть проект

Открытые методы

Метод Описание
bubbleEvent ( $sender, $param ) Continue bubbling the "edit" command, "delete" command is handled in this class.
getEditViewID ( ) : string
getHeader ( ) : TRepeater
getList ( ) : TRepeater
getPager ( ) : TPager
getSearchCondition ( )
getSearchParameters ( ) : array
getSort ( ) : TDropDownList
onPreRender ( $param ) Loads and display the data.
setEditViewID ( $value )
setSearchCondition ( $value )
setSearchParameters ( $value )

Защищенные методы

Метод Описание
deleteRecord ( $sender, $param ) Deletes an Active Record.
getEditViewControl ( ) : TScaffoldEditView
getRecordCriteria ( ) : Prado\Data\ActiveRecord\TActiveRecordCriteria
initializeEdit ( $sender, $param ) Initialize the edit view control form when EditViewID is set.
initializeSort ( ) Initialize the sort drop down list and the column names repeater.
listItemCreated ( $sender, $param ) Initialize the default display for each Active Record item.
loadRecordData ( ) Fetch the records and data bind it to the list.
pageChanged ( $sender, $param ) Updates repeater page index with the pager new index value.
populateField ( $sender, $param ) Sets the Record primary key to the current repeater item's CustomData.

Описание методов

bubbleEvent() публичный Метод

Continue bubbling the "edit" command, "delete" command is handled in this class.
public bubbleEvent ( $sender, $param )

deleteRecord() защищенный Метод

Deletes an Active Record.
protected deleteRecord ( $sender, $param )

getEditViewControl() защищенный Метод

protected getEditViewControl ( ) : TScaffoldEditView
Результат TScaffoldEditView control for editing selected Active Record, null if EditViewID is not set.

getEditViewID() публичный Метод

public getEditViewID ( ) : string
Результат string TScaffoldEditView control ID for editing selected Active Record.

getHeader() публичный Метод

public getHeader ( ) : TRepeater
Результат TRepeater Repeater control for record property names.

getList() публичный Метод

public getList ( ) : TRepeater
Результат TRepeater Repeater control for Active Record instances.

getPager() публичный Метод

public getPager ( ) : TPager
Результат TPager List pager control.

getRecordCriteria() защищенный Метод

protected getRecordCriteria ( ) : Prado\Data\ActiveRecord\TActiveRecordCriteria
Результат Prado\Data\ActiveRecord\TActiveRecordCriteria sort/search/paging criteria

getSearchCondition() публичный Метод

public getSearchCondition ( )

getSearchParameters() публичный Метод

public getSearchParameters ( ) : array
Результат array search parameters

getSort() публичный Метод

public getSort ( ) : TDropDownList
Результат TDropDownList Control that displays and controls the record ordering.

initializeEdit() защищенный Метод

Initialize the edit view control form when EditViewID is set.
protected initializeEdit ( $sender, $param )

initializeSort() защищенный Метод

Initialize the sort drop down list and the column names repeater.
protected initializeSort ( )

listItemCreated() защищенный Метод

Initialize the default display for each Active Record item.
protected listItemCreated ( $sender, $param )

loadRecordData() защищенный Метод

Fetch the records and data bind it to the list.
protected loadRecordData ( )

onPreRender() публичный Метод

Loads and display the data.
public onPreRender ( $param )

pageChanged() защищенный Метод

Updates repeater page index with the pager new index value.
protected pageChanged ( $sender, $param )

populateField() защищенный Метод

Binds the inner repeater with properties of the current Active Record.
protected populateField ( $sender, $param )

setEditViewID() публичный Метод

public setEditViewID ( $value )

setSearchCondition() публичный Метод

public setSearchCondition ( $value )

setSearchParameters() публичный Метод

public setSearchParameters ( $value )