public function delete($nodeId) { $tagCategory = new Type($this->getDataSource()); $tagCategory->autocommit(false); $tagCategory->loadById($nodeId); $tagCategory->purge(); $tagCategory->commit(); $tagCategory->buildTree(null, true); return $tagCategory->getValues(); }