コード例 #1
0
 /**
  * Renders a node collection recursive or just a single instance
  *
  * @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $node
  * @param bool $recursive
  * @return string
  */
 public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
 {
     $this->recursionLevel = 0;
     $code = '<ul class="level' . $this->recursionLevel . '" style="margin-left:10px">';
     $code .= $this->renderNode($tree->getRoot(), $recursive);
     $code .= '</ul>';
     return $code;
 }
コード例 #2
0
 /**
  * Renders a node collection recursive or just a single instance
  *
  * @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $node
  * @param bool $recursive
  * @return string
  */
 public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = TRUE)
 {
     $this->recursionLevel = 0;
     $children = $this->renderNode($tree->getRoot(), $recursive);
     return json_encode($children);
 }
コード例 #3
0
 /**
  * Renders a node collection recursive or just a single instance
  *
  * @param \TYPO3\CMS\Backend\Tree\AbstractTree $tree
  * @param bool $recursive
  * @return array
  */
 public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
 {
     $this->recursionLevel = 0;
     return $this->renderNode($tree->getRoot(), $recursive);
 }