public function removeNodesWithComponent($components)
    {
        settype($components, 'array');

        if (count($components)) {
            //get all the nodes belonging to the components   
            $ids = $this->getService('repos:base.node')
                        ->getQuery()
                        ->disableChain()
                        ->component($components)
                        ->fetchValues('id');

            if (count($ids)) {
                //delete all the nodes
                $this->getService('repos:base.node')->destroy($ids);

                //clean up any related nodes
                if (!empty($ids)) {
                    $this->cleanupNodesWithIds($ids);
                }
            }
        }
    }