예제 #1
0
 /**
  * Adds an item as a child of another item.
  * Overloads the parent method to make sure that
  * we do not add already existing children.
  * @param string $itemName the item name.
  * @param string $childName the child item name.
  * @throws CException if either parent or child doesn't exist or if a loop has been detected.
  */
 public function addItemChild($itemName, $childName)
 {
     // Make sure that the item doesn't already have this child.
     if ($this->hasItemChild($itemName, $childName) === false) {
         return parent::addItemChild($itemName, $childName);
     }
 }