insertAt() публичный Метод

This overrides the parent implementation by performing additional operations for each newly added child control.
public insertAt ( $index, $item )
Пример #1
0
 /**
  * Inserts an item at the specified position.
  * This overrides the parent implementation by performing additional
  * operations for each newly added table cell.
  * @param integer the speicified position.
  * @param mixed new item
  * @throws TInvalidDataTypeException if the item to be inserted is not a TTableCell object.
  */
 public function insertAt($index, $item)
 {
     if ($item instanceof TTableCell) {
         parent::insertAt($index, $item);
     } else {
         throw new TInvalidDataTypeException('tablecellcollection_tablecell_required');
     }
 }
Пример #2
0
 /**
  * Inserts an item at the specified position.
  * This overrides the parent implementation by performing sanity check on the type of new item.
  * @param integer the speicified position.
  * @param mixed new item
  * @throws TInvalidDataTypeException if the item to be inserted is not a {@link TAccordionView} object.
  */
 public function insertAt($index, $item)
 {
     if ($item instanceof TAccordionView) {
         parent::insertAt($index, $item);
     } else {
         throw new TInvalidDataTypeException('tabviewcollection_tabview_required');
     }
 }