Class TListItemCollection

Description

TListItemCollection class.

TListItemCollection maintains a list of TListItem for TListControl.

  • since: 3.0
  • version: $Id: TListControl.php 2591 2008-12-19 20:31:18Z carlgmathisen $
  • author: Qiang Xue <qiang.xue@gmail.com>

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

TComponent
   |
   --TList
      |
      --TListItemCollection
Direct descendents
Class Description
TActiveListItemCollection TActiveListItemCollection class.
Method Summary
TListItem createListItem ([integer $index = -1])
TListItem createNewListItem ([mixed $text = null])
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
createListItem (line 900)

Creates a list item object.

This method may be overriden to provide a customized list item object.

  • return: list item object
  • access: public
TListItem createListItem ([integer $index = -1])
  • integer $index: index where the newly created item is to be inserted at. If -1, the item will be appended to the end.
createNewListItem (line 913)
  • return: new item.
  • access: protected
TListItem createNewListItem ([mixed $text = null])
findIndexByText (line 962)

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 943)

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 995)

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 981)

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 928)

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.

Redefined in descendants as:
loadState (line 1008)

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 1020)

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::count()
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::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
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 Sun, 11 Jan 2009 20:23:00 -0500 by phpDocumentor 1.3.0RC4