## Class TListItemCollection

Description

TListItemCollection class.

TListItemCollection maintains a list of TListItem for TListControl.

- since: 3.0
- version: $Revision: $ $Date: $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TListControl.php (line 630)

    TComponent
       |
       --TList
          |
          --TListItemCollection

Method Summary
integer findIndexByText (string $text, [boolean $includeDisabled = true])
integer findIndexByValue (string $value, [boolean $includeDisabled = true])
TListItem findItemByText (string $text, [boolean $includeDisabled = true])
TListItem findItemByValue (string $value, [boolean $includeDisabled = true])
void insertAt (integer $index, TListItem $item)
void loadState (array|null $state)
array|null saveState ()
Methods
findIndexByText (line 674)

Finds the lowest cardinal index of the item whose text is the one being looked for.

- return: the index of the item found, -1 if not found.
- access: public

integer findIndexByText (string $text, [boolean $includeDisabled = true])

- string $text: the text to be looked for
- boolean $includeDisabled: whether to look for disabled items also

findIndexByValue (line 655)

Finds the lowest cardinal index of the item whose value is the one being looked for.

- return: the index of the item found, -1 if not found.
- access: public

integer findIndexByValue (string $value, [boolean $includeDisabled = true])

- string $value: the value to be looked for
- boolean $includeDisabled: whether to look for disabled items also

findItemByText (line 707)

Finds the item whose text is the one being looked for.

- return: the item found, null if not found.
- access: public

TListItem findItemByText (string $text, [boolean $includeDisabled = true])

- string $text: the text to be looked for
- boolean $includeDisabled: whether to look for disabled items also

findItemByValue (line 693)

Finds the item whose value is the one being looked for.

- return: the item found, null if not found.
- access: public

TListItem findItemByValue (string $value, [boolean $includeDisabled = true])

- string $value: the value to be looked for
- boolean $includeDisabled: whether to look for disabled items also

insertAt (line 639)

Inserts an item into the collection.

- access: public
- throws: TInvalidDataTypeException if the item being inserted is neither a string nor TListItem

void insertAt (integer $index, TListItem $item)

- integer $index: the location where the item will be inserted. The current item at the place and the following ones will be moved backward.
- TListItem $item: the item to be inserted.

Redefinition of:

TList::insertAt()
  Inserts an item at the specified position.

loadState (line 720)

Loads state into every item in the collection.

This method should only be used by framework and control developers.

- access: public

void loadState (array|null $state)

- array|null $state: state to be loaded.

saveState (line 735)

Saves state of items.

This method should only be used by framework and control developers.

- return: the saved state
- access: public

array|null saveState ()

#### Inherited Methods

Inherited From TList

> TList::__construct()
> TList::add()
> TList::clear()
> TList::contains()
> TList::copyFrom()
> TList::getCount()
> TList::getIterator()
> TList::getReadOnly()
> TList::indexOf()
> TList::insertAt()
> TList::itemAt()
> TList::mergeWith()
> TList::offsetExists()
> TList::offsetGet()
> TList::offsetSet()
> TList::offsetUnset()
> TList::remove()
> TList::removeAt()
> TList::setReadOnly()
> TList::toArray()

Inherited From TComponent

> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Mon, 01 May 2006 23:04:02 -0400 by phpDocumentor 1.3.0RC4