Webiny\Component\Entity\Entity::remove PHP Method

remove() public method

Remove instance from pool
public remove ( AbstractEntity $instance ) : boolean
$instance AbstractEntity
return boolean
    public function remove(AbstractEntity $instance)
    {
        $entityPool = $this->pool->key(get_class($instance), $this->arr(), true);
        $entityPool->removeKey($instance->id);
        unset($instance);
        return true;
    }