PHP Class Prado\Web\UI\ActiveControls\TActiveListItemCollection

Allows TActiveDropDownList and TActiveListBox to add new options during callback response. New options can only be added after the {@link TControl::onLoad OnLoad} event. The {@link getListHasChanged ListHasChanged} property is true when the list items has changed. The control responsible for the list needs to repopulate the client-side options.
Since: 3.1
Inheritance: extends Prado\Collections\TListItemCollection
Datei anzeigen Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
getControl ( ) : Prado\Web\UI\ActiveControls\IActiveControl
getListHasChanged ( ) : boolean
insertAt ( $index, $value ) Inserts an item into the collection.
removeAt ( $index ) Removes an item from at specified index.
setControl ( Prado\Web\UI\ActiveControls\IActiveControl $control )
updateClientSide ( ) Update client-side list items.

Protected Methods

Method Description
canUpdateClientSide ( ) : boolean

Method Details

canUpdateClientSide() protected method

protected canUpdateClientSide ( ) : boolean
return boolean true if active controls can update client-side and the onLoad event has already been raised.

getControl() public method

public getControl ( ) : Prado\Web\UI\ActiveControls\IActiveControl
return Prado\Web\UI\ActiveControls\IActiveControl active control using the collection.

getListHasChanged() public method

public getListHasChanged ( ) : boolean
return boolean true if the list has changed after onLoad event.

insertAt() public method

The new option is added on the client-side during callback.
public insertAt ( $index, $value )

removeAt() public method

Removes an item from at specified index.
public removeAt ( $index )

setControl() public method

public setControl ( Prado\Web\UI\ActiveControls\IActiveControl $control )
$control Prado\Web\UI\ActiveControls\IActiveControl

updateClientSide() public method

Update client-side list items.
public updateClientSide ( )