Removes given element

@param mixed $element The element to remove
@return $this
494893
public function remove($element)
    {
        if ($this->count() > 0) {
            foreach ($this->elements as $index => $existing) {
                if ($element === $existing) {
                    unset($this->elements[$index]);

                    break;
                }
            }
        }

        return $this;
    }
740097
public function remove($element)
    {
        $currentValue = $this->getRawValue();

        if (($key = array_search($element, $currentValue)) !== false) {
            unset($currentValue[$key]);
            $this->setRawValue($currentValue);
        }
    }
991159
public function remove($element) : void
    {
        $key = array_search($element, $this->elements);
        if ($key === false) {
            return;
        }
        unset($this->elements[$key]);
    }
215423
protected function prepareElement($element)
    {
        $options    = $this->getOptions();
        $currClass  = $element->getAttribute('class');
        $class      = $currClass . (null !== $currClass ? ' ' : '') . $options['class'];

        $element->setAttributes(array(
            'class'             => $class,
            'data-color'        => $options['color'],
            'data-color-format' => $options['format'],
        ));

        return $element;
    }
1211108
public function setData($element)
	{
		$rules = $this->processRules($element);

		$this->ruleProvider->setData($rules);

		return $this;
	}
920167
public function removeAll($elements): bool {
        $removed = false;
        foreach ($elements as $element) {
            $removed |= $this->remove($element);
        }
        return $removed;
    }
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;
    }
1022796
public function remove()
    {
        if ($this->node->parentNode === null) {
            throw new LogicException('Can not remove element without parent node');
        }

        $removedNode = $this->node->parentNode->removeChild($this->node);

        return new Element($removedNode);
    }
898271
public function remove($key)
    {
        if (false === $this->willRemove($key)) {
            $this->clearChange($key);
            if (true === $this->hasOriginal($key)) {
                $this->remove[] = $key;
            }
        }
        return $this;
    }
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]);
		}
	}
275053
public function remove($item)
    {
        $hash = spl_object_hash($item);
        if (isset($this->_items[$hash])) {
            unset($this->_items[$hash]);
        }
        
        return $this;
    }
298965
public function setInstance(Hierarchy $element)
    {
        $class = get_class($element);
        $this->hierarchy[$class][$element->getID()] = $element;
        return $this;
    }
306841
public function remove($element) {
        foreach ($this->elements as $index => $e) {
            if ($e === $element) {
                unset($this->elements[$index]);
                $this->fire(new SetRemoveEvent($element));
                return;
            }
        }
    }
1017079
public function set($key, $element) {
		$key = $this->extractKey($key);
		$this->collection[$key] = $element;
		
		return $this;
	}
418362
public function _prep_element($element) {
		if (strrpos($element, 'this')===false&&strrpos($element, 'event')===false&&strrpos($element, 'self')===false) {
			$element='"'.addslashes($element).'"';
		}
		return $element;
	}
515526
public function addElement(Element $element): Element
    {
        if ($element instanceof FormStatus) {
            if ($this->hasStatus === true) {
                throw new InvalidArgumentException('Form can contain only one FormStatus element');
            }
            $this->hasStatus = true;
        }
        return parent::addElement($element);
    }
1072279
private function removeElements( $elements ) {
		$list = $elements;
		if ( $elements instanceof \DOMNodeList ) {
			$list = [];
			foreach ( $elements as $element ) {
				$list[] = $element;
			}
		}
		/** @var $element \DOMElement */
		foreach ( $list as $element ) {
			if ( $element->parentNode ) {
				$element->parentNode->removeChild( $element );
			}
		}
		return $list;
	}