Exemple #1
0
 public function getTreeListHTML(AbstractTreeRepository $repository, $active_id = 0)
 {
     $ah = $this->getContainer()->get('itf.admin_helper');
     $options = array('decorate' => true, 'rootOpen' => '<ul>', 'rootClose' => '</ul>', 'childOpen' => '<li>', 'childClose' => '</li>', 'nodeDecorator' => function ($node) use($ah) {
         return '<a href="' . $ah->getEditPath($node['id']) . '">' . $node['label'] . '</a> (' . $node['lft'] . '::' . $node['rgt'] . ')';
     });
     $htmlTree = $repository->childrenHierarchy(null, false, $options);
     return $htmlTree;
 }