PHP Class QListControl, qcodo

This object is the foundation for the ListBox, CheckBoxList, RadioButtonList and TreeNav.
Inheritance: extends QControl
Show file Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$objItemsArray QListItem[]

Public Methods

Method Description
AddItem ( mixed $mixListItemOrName, string $strValue = null, boolean $blnSelected = null, string $strItemGroup = null, string $strOverrideParameters = null ) : QListItem Allows you to add a QListItem to the QListControl at the end of the private objItemsArray.
AddItemAt ( integer $intIndex, QListItem $objListItem ) Allows you to add a QListItem to this QListControl at a specific location in the current item array
AddItems ( array $mixItemArray, mixed $mixSelectedValues = null, string $strItemGroup = null, string $strOverrideParameters = null ) Allows you to add an array of key/value pairs to the ListControl. Convenient especially for adding a list from a type table, e.g. by passing in SomeType::$NameArray. The list of seleted values can either be an array of values, or just a single value.
CountItems ( ) : integer Returns the count of items in this QListControl
GetAllItems ( ) : QListItem[] This will return an array of ALL the QQListItems associated with this QListControl.
GetItem ( $intIndex ) Gets the ListItem at a specific location in objItemsArray
RemoveAllItems ( ) Removes all the items in objItemsArray
RemoveItem ( $intIndex ) Removes a specific ListItem at a specific location in objItemsArray
__get ( $strName )
__set ( $strName, $mixValue )

Method Details

AddItem() public method

Allows you to add a QListItem to the QListControl at the end of the private objItemsArray.
public AddItem ( mixed $mixListItemOrName, string $strValue = null, boolean $blnSelected = null, string $strItemGroup = null, string $strOverrideParameters = null ) : QListItem
$mixListItemOrName mixed
$strValue string
$blnSelected boolean
$strItemGroup string
$strOverrideParameters string
return QListItem

AddItemAt() public method

Allows you to add a QListItem to this QListControl at a specific location in the current item array
public AddItemAt ( integer $intIndex, QListItem $objListItem )
$intIndex integer the index of the location to add the new item to
$objListItem QListItem the item to add

AddItems() public method

Allows you to add an array of key/value pairs to the ListControl. Convenient especially for adding a list from a type table, e.g. by passing in SomeType::$NameArray. The list of seleted values can either be an array of values, or just a single value.
public AddItems ( array $mixItemArray, mixed $mixSelectedValues = null, string $strItemGroup = null, string $strOverrideParameters = null )
$mixItemArray array name/value pairs of QListItems to add to this QListControl
$mixSelectedValues mixed can be an array of selected values, or just an atomic value, that is selected (optional)
$strItemGroup string
$strOverrideParameters string

CountItems() public method

Returns the count of items in this QListControl
public CountItems ( ) : integer
return integer

GetAllItems() public method

Please note that while each individual item can be altered, altering the array, itself, will not affect any change on the QListControl. So existing QQListItems may be modified, but to add / remove items from the QListControl, you should use AddItem() and RemoveItem().
public GetAllItems ( ) : QListItem[]
return QListItem[]

GetItem() public method

Gets the ListItem at a specific location in objItemsArray
public GetItem ( $intIndex )

RemoveAllItems() public method

Removes all the items in objItemsArray
public RemoveAllItems ( )

RemoveItem() public method

Removes a specific ListItem at a specific location in objItemsArray
public RemoveItem ( $intIndex )

__get() public method

public __get ( $strName )

__set() public method

public __set ( $strName, $mixValue )

Property Details

$objItemsArray protected property

protected QListItem[] $objItemsArray
return QListItem[]