Removes the parent from the item with the given name.
@param string $itemName name of the item.
@param string $parentName name of the parent.
333323
public function actionRemoveParent($itemName, $parentName)
    {
        /* @var $am CAuthManager|AuthBehavior */
        $am = Yii::app()->getAuthManager();

        if ($am->hasItemChild($parentName, $itemName)) {
            $am->removeItemChild($parentName, $itemName);
            if ($am instanceof CPhpAuthManager) {
                $am->save();
            }
        }

        $this->redirect(array('view', 'name' => $itemName));
    }
673026
def removeParent(self):
        

        self.log.debug("Try to remove the parent workitem from current "
                       "<Workitem %s>",
                       self)

        headers = copy.deepcopy(self.rtc_obj.headers)
        headers["Content-Type"] = self.OSLC_CR_JSON
        req_url = "".join([self.url,
                           "?oslc_cm.properties=com.ibm.team.workitem.",
                           "linktype.parentworkitem.parent"])

        parent_tag = ("rtc_cm:com.ibm.team.workitem.linktype."
                      "parentworkitem.parent")
        parent_original = {parent_tag: []}

        self.put(req_url,
                 verify=False,
                 proxies=self.rtc_obj.proxies,
                 headers=headers,
                 data=json.dumps(parent_original))
        self.log.info("Successfully remove the parent workitem of current "
                      "<Workitem %s>",
                      self)
275522
public function preRemove(Item $item, LifecycleEventArgs $event)
    {
        $interaction = $item->getInteraction();
        if (null !== $interaction) {
            $event->getEntityManager()->remove($interaction);
        }
    }
382696
public function removeMenuItem($alias, $parent = null)
    {
        if ($parent !== null) {
            if (!isset($this->_menuItems[$parent]) ||
                !isset($this->_menuItems[$parent]['children']) ||
                !isset($this->_menuItems[$parent]['children'][$alias])
            ) {
                return;
            }
            unset($this->_menuItems[$parent]['children'][$alias]);
            return;
        }

        if (!isset($this->_menuItems[$alias])) {
            return;
        }
        unset($this->_menuItems[$alias]);
    }
79884
private void removeProperty(ItemState item, int indexItem)
   {
      if (indexItem == -1)
      {
         items.remove(item);
      }
      else
      {
         items.remove(indexItem);
      }
      index.remove(item.getData().getIdentifier());
      index.remove(item.getData().getQPath());
      index.remove(new ParentIDQPathBasedKey(item));
      index.remove(new IDStateBasedKey(item.getData().getIdentifier(), item.getState()));
      lastChildPropertyStates.remove(item.getData().getIdentifier());
      childPropertyStates.remove(item.getData().getIdentifier());

      Map<String, ItemState> children = lastChildPropertyStates.get(item.getData().getParentIdentifier());
      if (children != null)
      {
         children.remove(item.getData().getIdentifier());
         if (children.isEmpty())
         {
            lastChildPropertyStates.remove(item.getData().getParentIdentifier());
         }
      }

      List<ItemState> listItemStates = childPropertyStates.get(item.getData().getParentIdentifier());
      if (listItemStates != null)
      {
         listItemStates.remove(item);
         if (listItemStates.isEmpty())
         {
            childPropertyStates.remove(item.getData().getParentIdentifier());
         }
      }
   }
566221
def __remove_child(self, parent_tree_node, index):
        
        # get parent and item
        parent_item = self.__mapping[id(parent_tree_node)]
        # manage the item model
        self.item_model_controller.begin_remove(index, index, parent_item.row, parent_item.id)
        child_item = parent_item.children[index]
        parent_item.remove_child(child_item)
        self.__mapping.pop(id(child_item.data["tree_node"]))
        self.item_model_controller.end_remove()
536664
public function deleteItem($id = null)
    {
        if ($id === null) {
            throw new ItemNotSelectedException;
        }
        $entity = $this->getById($id);
        $this->deleteEntity($entity);
    }
1085393
public void removeChildren(CmsUUID parentId) {

        // create a new list to avoid concurrent modifications
        Collection<?> children = getChildren(parentId);
        // may be null when monkey clicking
        if (children != null) {
            List<Object> childIds = new ArrayList<Object>(children);
            for (Object childId : childIds) {
                removeItemRecursively(childId);
            }
        }
    }
381140
private function verifyItemExistenceInSubItemList(string $itemName, string $itemType, string $containerName, bool $itemShouldExist): void
    {
        $isItemInTable = PageObjectFactory::createPage($this->utilityContext, ContentItemPage::PAGE_NAME, $containerName)
            ->subItemList->table->isElementInTable($itemName, $itemType);

        $itemShouldExistString = $itemShouldExist ? '' : 'n\'t';

        if ($isItemInTable !== $itemShouldExist) {
            Assert::fail(sprintf('%s "%s" should%s be on %s Sub-items list', $itemType, $itemName, $itemShouldExistString, $containerName));
        }
    }
636045
public function remove($name)
    {
        if (isset($this->items[$name])) {
            $this->count--;
        }

        unset($this->items[$name]);
    }
1144593
public function delete($itemId, $attachmentId, $optParams = array())
  {
    $params = array('itemId' => $itemId, 'attachmentId' => $attachmentId);
    $params = array_merge($params, $optParams);
    return $this->call('delete', array($params));
  }
130268
public function set($sectionName, $itemName, $itemValue)
    {
        $section = $this->getSection($sectionName);
        $section->set($itemName, $itemValue);

        return $this;
    }
1108126
def delete_parent(sender, instance, **kwargs):
    
    ItemRelation.objects.filter(child_id=instance.item_id).delete()
552313
public function remove($name)
    {
        if (!isset($this->indexed[$name])) {
            return;
        }
        unset($this->indexed[$name]);

        foreach ($this->items as $i => $v) {
            if ($v === $name) {
                unset($this->items[$i]);
            }
        }
    }
966292
public function get_old_parentid($itemname) {
        return array_key_exists($itemname, $this->elementsoldid) ? $this->elementsoldid[$itemname] : null;
    }
392078
function delete($name)
    {
        if (isset($this->children[$name])){
            $this->children[$name]->parent = null;
            unset($this->children[$name]);
        }else
        if (isset($this->temps[$name])){
            $this->temps[$name]->parent = null;
            unset($this->temps[$name]);
        }
    }
1257155
public function isParentOf($itemId, $parentId)
    {
        $path = $this->getMelisKeyData($itemId);
        $paths = explode('/', $path);

        if (count($paths) > 0) {
            if (in_array($parentId, $paths)) {
                return true;
            }
        }

        return false;
    }