public removedControl ( $control ) |
public function removedControl($control)
{
if ($this->_namingContainer) {
$this->_namingContainer->clearNameTable();
}
$control->unloadRecursive();
$control->_parent = null;
$control->_page = null;
$control->_namingContainer = null;
$control->_tplControl = null;
//$control->_stage=self::CS_CONSTRUCTED;
if (!($control->_flags & self::IS_ID_SET)) {
$control->_id = '';
} else {
unset($this->_rf[self::RF_NAMED_OBJECTS][$control->_id]);
}
$control->clearCachedUniqueID(true);
}
/** * Removes an item at the specified position. * This overrides the parent implementation by performing additional * cleanup work when removing a child control. * @param integer the index of the item to be removed. * @return mixed the removed item. */ public function removeAt($index) { $item = parent::removeAt($index); if ($item instanceof TControl) { $this->_o->removedControl($item); } return $item; }