addedControl() public method

Control lifecycles will be caught up during the addition. Only framework developers should use this method.
public addedControl ( $control )
コード例 #1
0
 /**
  * Inserts an item at the specified position.
  * This overrides the parent implementation by performing additional
  * operations for each newly added child control.
  * @param integer the speicified position.
  * @param mixed new item
  * @throws TInvalidDataTypeException if the item to be inserted is neither a string nor a TControl.
  */
 public function insertAt($index, $item)
 {
     if ($item instanceof TControl) {
         parent::insertAt($index, $item);
         $this->_o->addedControl($item);
     } else {
         if (is_string($item) || $item instanceof IRenderable) {
             parent::insertAt($index, $item);
         } else {
             throw new TInvalidDataTypeException('controlcollection_control_required');
         }
     }
 }