/**
  * Inserts an item at the specified position.
  * This overrides the parent implementation by ignoring new addition.
  * @param integer the speicified position.
  * @param mixed new item
  */
 public function insertAt($index, $item)
 {
     if (!is_string($item)) {
         // string is possible if property tag is used. we simply ignore it in this case
         parent::insertAt($index, $item);
     }
     // this will generate an exception in parent implementation
 }
Example #2
0
 public function insertAt($index, $item)
 {
     if (!is_string($item)) {
         parent::insertAt($index, $item);
     }
 }
Example #3
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');
     }
 }
Example #4
0
 /**
  * Inserts an item at the specified position.
  * This overrides the parent implementation by performing additional
  * operations for each newly added pages in TabPanel.
  * @param integer the speicified position.
  * @param mixed new item
  * @throws TInvalidDataTypeException if the item to be inserted is not a YTabPage object.
  */
 public function insertAt($index, $item)
 {
     if ($item instanceof YTabPage) {
         parent::insertAt($index, $item);
     } else {
         throw new TInvalidDataTypeException('childs of YTabPanel must be YTabPage type (' . get_class($TabPage) . ' given)');
     }
 }
Example #5
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');
     }
 }