## Class TControlCollection

Description

TControlCollection class

TControlCollection implements a collection that enables controls to maintain a list of their child controls.

- since: 3.0
- version: $Id: TControl.php 1532 2006-12-01 12:28:55Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TControl.php (line 1723)

    TComponent
       |
       --TList
          |
          --TControlCollection

Direct descendents

Class | Description
--- | ---
TEmptyControlCollection | TEmptyControlCollection class
TViewCollection | TViewCollection class.
TTableRowCollection | TTableRowCollection class.
TTableCellCollection | TTableCellCollection class.

Method Summary
TControlCollection __construct (TControl $owner, [boolean $readOnly = false])
void clear ()
TControl getOwner ()
void insertAt (integer $index, mixed $item)
mixed removeAt (integer $index)
Methods
Constructor __construct (line 1736)

Constructor.

- access: public

TControlCollection __construct (TControl $owner, [boolean $readOnly = false])

- TControl $owner: the control that owns this collection.
- boolean $readOnly: whether the list is read-only

Redefinition of:

TList::__construct()
  Constructor.

Redefined in descendants as:

- TEmptyControlCollection::__construct() : Constructor.

clear (line 1789)

Overrides the parent implementation by invoking TControl::clearNamingContainer

- access: public

void clear ()

Redefinition of:

TList::clear()
  Removes all items in the list.

getOwner (line 1745)

- return: the control that owns this collection.
- access: protected

TControl getOwner ()
insertAt (line 1758)

Inserts an item at the specified position.

This overrides the parent implementation by performing additional operations for each newly added child control.

- access: public
- throws: TInvalidDataTypeException if the item to be inserted is neither a string nor a TControl.

void insertAt (integer $index, mixed $item)

- integer $index: the speicified position.
- mixed $item: new item

Redefinition of:

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

Redefined in descendants as:

- TEmptyControlCollection::insertAt() : Inserts an item at the specified position.
- TViewCollection::insertAt() : Inserts an item at the specified position.
- TTableRowCollection::insertAt() : Inserts an item at the specified position.
- TTableCellCollection::insertAt() : Inserts an item at the specified position.

removeAt (line 1778)

Removes an item at the specified position.

This overrides the parent implementation by performing additional cleanup work when removing a child control.

- return: the removed item.
- access: public

mixed removeAt (integer $index)

- integer $index: the index of the item to be removed.

Redefinition of:

TList::removeAt()
  Removes an item at the specified position.

#### 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, 14 Jan 2007 21:41:48 -0500 by phpDocumentor 1.3.0RC4