PHP Класс Prado\Collections\TListItemCollection

TListItemCollection maintains a list of {@link TListItem} for {@link TListControl}.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TList
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
createListItem ( $index ) : TListItem Creates a list item object.
findIndexByText ( $text, $includeDisabled = true ) : integer Finds the lowest cardinal index of the item whose text is the one being looked for.
findIndexByValue ( $value, $includeDisabled = true ) : integer Finds the lowest cardinal index of the item whose value is the one being looked for.
findItemByText ( $text, $includeDisabled = true ) : TListItem Finds the item whose text is the one being looked for.
findItemByValue ( $value, $includeDisabled = true ) : TListItem Finds the item whose value is the one being looked for.
insertAt ( $index, $item ) Inserts an item into the collection.
loadState ( $state ) Loads state into every item in the collection.
saveState ( ) : array | null Saves state of items.

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

Метод Описание
createNewListItem ( $text = null ) : TListItem

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

createListItem() публичный метод

This method may be overriden to provide a customized list item object.
public createListItem ( $index ) : TListItem
Результат Prado\Web\UI\WebControls\TListItem list item object

createNewListItem() защищенный метод

protected createNewListItem ( $text = null ) : TListItem
Результат Prado\Web\UI\WebControls\TListItem new item.

findIndexByText() публичный метод

Finds the lowest cardinal index of the item whose text is the one being looked for.
public findIndexByText ( $text, $includeDisabled = true ) : integer
Результат integer the index of the item found, -1 if not found.

findIndexByValue() публичный метод

Finds the lowest cardinal index of the item whose value is the one being looked for.
public findIndexByValue ( $value, $includeDisabled = true ) : integer
Результат integer the index of the item found, -1 if not found.

findItemByText() публичный метод

Finds the item whose text is the one being looked for.
public findItemByText ( $text, $includeDisabled = true ) : TListItem
Результат Prado\Web\UI\WebControls\TListItem the item found, null if not found.

findItemByValue() публичный метод

Finds the item whose value is the one being looked for.
public findItemByValue ( $value, $includeDisabled = true ) : TListItem
Результат Prado\Web\UI\WebControls\TListItem the item found, null if not found.

insertAt() публичный метод

Inserts an item into the collection.
public insertAt ( $index, $item )

loadState() публичный метод

This method should only be used by framework and control developers.
public loadState ( $state )

saveState() публичный метод

This method should only be used by framework and control developers.
public saveState ( ) : array | null
Результат array | null the saved state