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