Daniel Gomes 13 سال پیش
والد
کامیت
5e73f3d14a
1فایلهای تغییر یافته به همراه11 افزوده شده و 10 حذف شده
  1. 11 10
      lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

+ 11 - 10
lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php

@@ -853,7 +853,7 @@ class NestedTreeRepository extends AbstractTreeRepository
      * @param array|null $options
      * @param array|null $options
      * @return array|string
      * @return array|string
      */
      */
-    public function childrenArrayHierarchy($node = null, $direct = false, $html = false, array $options = null)
+    public function childrenHierarchy($node = null, $direct = false, $html = false, array $options = null)
     {
     {
         $meta = $this->getClassMetadata();
         $meta = $this->getClassMetadata();
         $config = $this->listener->getConfiguration($this->_em, $meta->name);
         $config = $this->listener->getConfiguration($this->_em, $meta->name);
@@ -899,19 +899,20 @@ class NestedTreeRepository extends AbstractTreeRepository
         }else{
         }else{
             $root_open  = "<ul> ";
             $root_open  = "<ul> ";
             $root_close = " </ul>";
             $root_close = " </ul>";
-        }
-        if(!empty($options['child'])){
-            $child_open  = $options['child']['open'];
-            $child_close = $options['child']['close'];
-        }else{
-            $child_open  = "<li> ";
-            $child_close = " </li>";
-        }
         
         
+            if(!empty($options['child'])){
+                $child_open  = $options['child']['open'];
+                $child_close = $options['child']['close'];
+            }else{
+                $child_open  = "<li> ";
+                $child_close = " </li>";
+            }
+        }
+
         $html_decorator = array(
         $html_decorator = array(
             'root'  => array('open' => $root_open,  'close' => $root_close),
             'root'  => array('open' => $root_open,  'close' => $root_close),
             'child' => array('open' => $child_open, 'close' => $child_close),
             'child' => array('open' => $child_open, 'close' => $child_close),
-            );
+        );
 
 
         $html_output = $this->processHtmlTree($nestedTree, $html_decorator, $html_output = null);
         $html_output = $this->processHtmlTree($nestedTree, $html_decorator, $html_output = null);