Browse Source

Merge pull request #359 from zhil/master

Closures on close option
Gediminas Morkevicius 13 years ago
parent
commit
c1e293ed15
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

+ 2 - 2
lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

@@ -1161,9 +1161,9 @@ class NestedTreeRepository extends AbstractTreeRepository
                 if (count($node['__children']) > 0) {
                 if (count($node['__children']) > 0) {
                     $output .= $build($node['__children']);
                     $output .= $build($node['__children']);
                 }
                 }
-                $output .= $options['childClose'];
+                $output .= is_string($options['childClose']) ? $options['childClose'] : $options['childClose']($node);
             }
             }
-            return $output . $options['rootClose'];
+            return $output . (is_string($options['rootClose']) ? $options['rootClose'] : $options['rootClose']($tree));
         };
         };
 
 
         return $build($nestedTree);
         return $build($nestedTree);