PHP Class Prado\Web\UI\WebControls\TBaseDataList
TBaseDataList is the base class for data listing controls, including
{@link TDataList} and {@link TDataGrid}.
The key field in the data source is specified by {@link setKeyField KeyField},
while {@link getKeyValues KeyValues} stores the key values of each record in
a data listing control. You may use the list item index to obtain the corresponding
database key value.
TBaseDataList also implements a few properties used for presentation based
on tabular layout. The {@link setCaption Caption}, whose alignment is
specified via {@link setCaptionAlign CaptionAlign}, is rendered as the table caption.
The table cellpadding and cellspacing are specified by
{@link setCellPadding CellPadding} and {@link setCellSpacing CellSpacing}
properties, respectively. The {@link setGridLines GridLines} specifies how
the table should display its borders, and the horizontal alignment of the table
content can be specified via {@link setHorizontalAlign HorizontalAlign}.
Afficher le fichier
Open project: pradosoft/prado
Class Usage Examples
Méthodes publiques
Méthodes protégées
Méthode |
Description |
|
createStyle ( ) : TTableStyle |
Creates a style object for the control. |
|
getDataFieldValue ( $data, $field ) : mixed |
Returns the value of the data at the specified field. |
|
Method Details
createStyle()
protected méthode
This method creates a {@link TTableStyle} to be used by the data list control.
protected createStyle ( ) : TTableStyle |
Résultat |
TTableStyle |
control style to be used |
getCellPadding()
public méthode
getCellSpacing()
public méthode
getDataFieldValue()
protected méthode
If data is an array, TMap or TList, the value will be returned at the index
of the specified field. If the data is a component with a property named
as the field name, the property value will be returned.
Otherwise, an exception will be raised.
getDataKeyField()
public méthode
getDataKeys()
public méthode
public getDataKeys ( ) : Prado\Collections\TList |
Résultat |
Prado\Collections\TList |
the keys used in the data listing control. |
getGridLines()
public méthode
public getGridLines ( ) : TTableGridLines |
Résultat |
TTableGridLines |
the grid line setting of the table layout. Defaults to TTableGridLines::None. |
getHorizontalAlign()
public méthode
public getHorizontalAlign ( ) : THorizontalAlign |
Résultat |
THorizontalAlign |
the horizontal alignment of the table content. Defaults to THorizontalAlign::NotSet. |
onSelectedIndexChanged()
public méthode
This method is invoked when a different item is selected
in a data listing control between posts to the server.
setCellPadding()
public méthode
setCellSpacing()
public méthode
setDataKeyField()
public méthode
setGridLines()
public méthode
Sets the grid line style of the table layout.
setHorizontalAlign()
public méthode