Remove element

@param BasketElement $element
@return bool
962487
public function removeElement(BasketElement $element)
    {
        if ($this->elements->removeElement($element)) {
            $element->setBasket();

            return true;
        }

        return false;
    }
734193
public function deletePluginEntry($folder, $element=null)
	{
		if ($this->baseDb->tableExists('#__plugins'))
		{
			// Delete plugin(s) entry
			$query = "DELETE FROM `#__plugins` WHERE `folder` = " . $this->baseDb->quote($folder) . ((!is_null($element)) ? " AND `element` = '{$element}'" : "");
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed plugin entry for "%s"', 'plg_' . $folder . ($element ? '_' . $element : '')));

			return true;
		}
		elseif ($this->baseDb->tableExists('#__extensions'))
		{
			// Delete plugin(s) entry
			$query = "DELETE FROM `#__extensions` WHERE `folder` = " . $this->baseDb->quote($folder) . ((!is_null($element)) ? " AND `element` = '{$element}'" : "");
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed extension entry for plugin "%s"', 'plg_' . $folder . ($element ? '_' . $element : '')));

			return true;
		}

		return false;
	}
1234562
public static function remove_node($node) {
		if (
			! \is_a($node, 'DOMElement') &&
			! \is_a($node, 'DOMNode')
		) {
			return false;
		}

		$node->parentNode->removeChild($node);

		return true;
	}
1292191
protected function removeRecursive($element, BinaryTree $node = null) {
        $nullAction = [$this, 'doNothing'];
        $matchAction = [$this, 'deleteNode'];
        return $this->doRecursive($nullAction, $matchAction, $element, $node);
    }
1156222
protected function removeFromTreeByElement(Model $element)
    {
        /** @var \T4\Orm\Model $class */
        $class = get_class($element);
        $tableName = $class::getTableName();
        /** @var \T4\Dbal\Connection $connection */
        $connection = $class::getDbConnection();

        $this->removeFromTreeByLftRgt($connection, $tableName, $element->__lft, $element->__rgt);
    }
685891
public function removeChild( AbstractElement $element ) {
		$index = $this->indexOf($element);
		if( $index !== null ) {
			unset($this->childElements[$index]);

			//Remove any gaps
			$this->childElements = array_values($this->childElements);

			return true;
		}

		return false;
	}
1210344
function removeElement($element)
    {
        if(get_class($element) !== $this->manager->getModel()){
            throw new InvalidArgumentException("This element is not compatible with this collection, it only support  ".$this->manager->getModel());
        }

        $key = array_search($element, $this->elements, true);

        if ($key !== false) {
            unset($this->elements[$key]);

            return true;
        }

        return false;
    }
847357
public function removeElement($name)
    {

        if (isset($this->elements[$name])) {
            unset($this->elements[$name]);
        }

        return $this;
    }
287879
public function remove($element)
    {
        $hash = $this->hash($element);
        if (isset($this->hashTable[$hash])) {
            $i = array_search($element, $this->hashTable[$hash], true);
            if ($i !== false) {
                unset($this->hashTable[$hash][$i]);
                return true;
            }
        }
        return false;
    }
267459
public synchronized void removeElement(T element) {
		List<T> origList = ref.get().list;
		boolean isPresent = origList.contains(element);
		if (!isPresent) {
			return;
		}
		
		List<T> newList = new ArrayList<T>(origList);
		newList.remove(element);
		
		swapWithList(newList);
	}
260125
function removeAllAttributes( DOMElement $element )
    {
        $attribs = $element->attributes;
        for ( $i = $attribs->length - 1; $i >= 0; $i-- )
        {
            $element->removeAttributeNode( $attribs->item( $i ) );
        }
    }
1352687
protected function removeOverNested( Node $el ) {
        if( $el->isTextNode() )
            return;
        else if( $el->beyondDefinitionLimit() )
        {
            $el->getParent()->removeChild( $el );
        }
        else
        {
            foreach( $el->getChildren() as $child )
                $this->removeOverNested($child);
        }
    }
1091060
public function remove($h)
	{
		$e = $this->getRawElement($h);
		if($e == null)
			return false;
		if($e[0] == self::TYPE_FILE)
			$this->removeFile($e[1]);
		unset($this->elements[$h]);
		return true;
	}
1372927
public static void removeChildrenFrom(final Element element) {
        if (element != null) {
            while (element.getFirstChild() != null) {
                element.removeChild(element.getFirstChild());
            }
        }
    }
418258
public function removeElement(AbstractElement $element)
	{
		$id = $element->getId();

		if (!isset($this->elements[$id])) {
			throw new MissingElementException("Element \"$id\" is not indexed.");
		}

		unset($this->elements[$id]);

		$indexedAttrs = array_intersect_key($element->getAttributes(), $this->index);
		foreach ($indexedAttrs as $key => $oldValue) {
			unset($this->index[$key][$oldValue][$id]);
		}
	}
92877
protected function cleanAttributesOnWhitelist(\DOMElement $element)
    {
        for ($x = $element->attributes->length - 1; $x >= 0; $x--) {
            // get attribute name
            $attrName = $element->attributes->item($x)->name;

            // Remove attribute if not in whitelist
            if (!in_array(strtolower($attrName), $this->allowedAttrs) && !$this->isAriaAttribute(strtolower($attrName)) && !$this->isDataAttribute(strtolower($attrName))) {

                $element->removeAttribute($attrName);
                $this->xmlIssues[] = array(
                    'message' => 'Suspicious attribute \'' . $attrName . '\'',
                    'line' => $element->getLineNo(),
		);
            }

            // Do we want to strip remote references?
            if($this->removeRemoteReferences) {
                // Remove attribute if it has a remote reference
                if (isset($element->attributes->item($x)->value) && $this->hasRemoteReference($element->attributes->item($x)->value)) {
                    $element->removeAttribute($attrName);
                    $this->xmlIssues[] = array(
                        'message' => 'Suspicious attribute \'' . $attrName . '\'',
                        'line' => $element->getLineNo(),
		    );
                }
            }
        }
    }
275623
public function remove($index) {
        $element = $this->get($index);
        if (!is_null($element)) { array_splice($this->_elements, $index, 1); }
        return $element;
    }