Remove a child node.
@param Node $child
@return $this
554863
protected function removeChild(Node $child) {
    $this->childCount--;
    foreach ($this->getChildProperties() as $name => $value) {
      if ($child === $value) {
        $this->{$name} = NULL;
        break;
      }
    }
    if ($child->previous === NULL) {
      $this->head = $child->next;
    }
    else {
      $child->previous->next = $child->next;
    }
    if ($child->next === NULL) {
      $this->tail = $child->previous;
    }
    else {
      $child->next->previous = $child->previous;
    }
    $child->parent = NULL;
    $child->previous = NULL;
    $child->next = NULL;
    return $this;
  }
730766
public function addChild(Folder $child)
    {
        $this->children[] = $child;
        $child->setParent($this);

        return $this;
    }
1195418
public function removeChild(\Octopouce\AdminBundle\Entity\Category $child)
    {
        return $this->childs->removeElement($child);
    }
1058379
public function removeChild(int $id): InnerNode
    {
        if ( ! isset($this->children[$id])) {
            return $this;
        }

        // handle moving next and previous assignments.
        $next = $this->children[$id]['next'];
        $prev = $this->children[$id]['prev'];
        if ( ! is_null($next)) {
            $this->children[$next]['prev'] = $prev;
        }
        if ( ! is_null($prev)) {
            $this->children[$prev]['next'] = $next;
        }

        // remove the child
        unset($this->children[$id]);

        //clear any cache
        $this->clear();

        return $this;
    }
173506
public function removeNode(NodeInterface $node): NodeInterface
    {
        unset($this->_nodes[$node->getId()]);

        if ($this->getParent()) {
            $this->getParent()->removeNode($node);
        }

        return $this;
    }
681235
public void removeChild(String child)
    {
        final Xml node = getChild(child);
        root.removeChild(node.getElement());
    }
1019274
public function remove($nodeName)
    {
        $children = self::removeTreeNode($this->hierarchy, $nodeName);
        // @todo remove all children
        $this->removeNodeFromList($nodeName);
        $this->updateRequired = true;

        return $this;
    }
268080
public function removeChild(\BisonLab\SakonninBundle\Entity\MessageType $child)
    {
        $this->children->removeElement($child);
    }
1273021
protected function prependChild(Node $node) {
    if ($this->head === NULL) {
      $this->childCount++;
      $node->parent = $this;
      $node->previous = NULL;
      $node->next = NULL;
      $this->head = $this->tail = $node;
    }
    else {
      $this->insertBeforeChild($this->head, $node);
      $this->head = $node;
    }
    return $this;
  }
380344
private function sanitizeAttributes(DOMNode $child)
    {
        // Compile a list of attributes that should be removed
        $remove_attributes = array();
        foreach ($child->attributes as $attrib)
        {
            $name = $attrib->name;
            if (!isset($this->allowed_attributes[$name]))
            {
                $remove_attributes[] = $attrib;
            }
            elseif ($name === "href")
            {
                $val = $attrib->nodeValue;

                $is_allowed = false;
                $proto_pos = strpos($val, ":");
                if ($proto_pos !== false)
                {
                    $proto = strtolower(substr($val, 0, $proto_pos));
                    if (isset($this->allowed_protocols[$proto]))
                        $is_allowed = true;
                }
                elseif (substr($val, 0, 2) === '//')
                { // External link with same protocol
                    if (isset($this->allowed_protocols['https']))
                        $is_allowed = true;
                }
                else 
                { // Internal link
                    $is_allowed = true;
                }

                if (!$is_allowed)
                    $remove_attributes[] = $attrib;
            }
        }

        // Remove all nodes selected for removal
        foreach ($remove_attributes as $attrib)
            $child->removeAttributeNode($attrib);
    }
1032757
public function addChild(Node $child)
    {
        $this->children[]            = $child;
        $child->parent               = $this;
        $child->properties['parent'] = $this->getId();
    }
1014590
public static <T extends MutableTreeNode<T>> void removeChild(T parent, T child) {
        checkArgNotNull(parent, "parent");
        int index = parent.getChildren().indexOf(child);
        checkElementIndex(index, parent.getChildren().size());
        parent.removeChild(index);
    }
85386
function remove(node, isRemoveChild) {
  if (!node || !node.parentNode) { return; }
  if (node.removeNode) { return node.removeNode(isRemoveChild); }

  const parent = node.parentNode;
  if (!isRemoveChild) {
    const nodes = [];
    for (let i = 0, len = node.childNodes.length; i < len; i++) {
      nodes.push(node.childNodes[i]);
    }

    for (let i = 0, len = nodes.length; i < len; i++) {
      parent.insertBefore(nodes[i], node);
    }
  }

  parent.removeChild(node);
}
1369138
public function removeChild(\CsnCms\Entity\Article $child)
    {
        $this->children->removeElement($child);
        $child->removeParent($this); // update the other site

        return $this;
    }
745565
public function remove($key)
    {
        $unit = $this->searchForId($key);
        if ($unit) {
            $unit->parentNode->removeChild($unit);
        }

        return $this;
    }
230933
public function removeChildren(Collection $children)
    {
        foreach ($children as $child) {
                $this->removeChild($child);
        }

        return $this;
    }
65525
public boolean removeChild( PlanNode child ) {
        boolean result = this.children.remove(child);
        if (result) {
            child.parent = null;
        }
        return result;
    }