TYPO3 CMS  TYPO3_6-2
ExtJsArrayTreeRenderer.php
Go to the documentation of this file.
1 <?php
3 
22 
30  protected function getNodeArray(\TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode $node) {
31  $nodeArray = parent::getNodeArray($node);
32  $nodeArray = array_merge($nodeArray, array(
33  'expanded' => $node->getExpanded(),
34  'expandable' => $node->hasChildNodes(),
35  'checked' => $node->getSelected()
36  ));
37  if (!$node->getSelectable()) {
38  unset($nodeArray['checked']);
39  }
40  return $nodeArray;
41  }
42 
50  public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = TRUE) {
51  $this->recursionLevel = 0;
52  $children = $this->renderNode($tree->getRoot(), $recursive);
53  return $children;
54  }
55 
56 }
renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive=TRUE)
getNodeArray(\TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode $node)
renderNode(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node, $recursive=TRUE)