/** * @return Tx_PtExtbase_Tree_Tree */ protected function createTestTree() { $tree = Tx_PtExtbase_Tree_Tree::getEmptyTree('root'); $rootNode = $tree->getRoot(); $firstNode = new Tx_PtExtbase_Tree_Node('firstNode'); $secondNode = new Tx_PtExtbase_Tree_Node('secondNode'); $firstChildOfSecondNode = new Tx_PtExtbase_Tree_Node('firstChildOfSecondNode'); $secondNode->addChild($firstChildOfSecondNode); $rootNode->addChild($firstNode); $rootNode->addChild($secondNode); return $tree; }
/** * Returns an empty tree with root node labeled by given label * * @param string $namespace Namespace for tree * @param string $rootLabel Label for root node * @return Tx_PtExtbase_Tree_Tree Empty tree object. */ public function getEmptyTree($namespace, $rootLabel = '') { return Tx_PtExtbase_Tree_Tree::getEmptyTree($namespace, $rootLabel); }