Przeglądaj źródła

closures for closes

Andrew Zhilin 13 lat temu
rodzic
commit
3c3c898872

+ 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);