aboutsummaryrefslogtreecommitdiff
path: root/src/model/Position.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/Position.php')
-rw-r--r--src/model/Position.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/model/Position.php b/src/model/Position.php
index 8035481..fdba271 100644
--- a/src/model/Position.php
+++ b/src/model/Position.php
@@ -23,9 +23,13 @@ trait Position
23 $this->children[$j + 1] = $tmp; 23 $this->children[$j + 1] = $tmp;
24 } 24 }
25 25
26 foreach($this->children as $child) { 26 // récursivité (utile dans Menu et chemin)
27 if(count($child->children) > 0) { 27 // appel dans Page et dans MenuAndPathController (un tri supplémentaire à faire?)
28 $child->sortChildren($reindexation); 28 if(self::class === 'App\Entity\Page'){
29 foreach($this->children as $child) {
30 if(count($child->children) > 0) {
31 $child->sortChildren($reindexation);
32 }
29 } 33 }
30 } 34 }
31 35