From f27cca08ff786ceff1870147f6d6bad14d71117f Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 23 Oct 2026 00:47:32 +0200 Subject: =?UTF-8?q?dossiers=20avec=20majuscule,=20namespace=20pour=20toute?= =?UTF-8?q?s=20les=20classes,=20autoload=20psr-4,=20UserDataService::creat?= =?UTF-8?q?eZip=20d=C3=A9plac=C3=A9=20dans=20Backup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/Position.php | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/model/Position.php (limited to 'src/model/Position.php') diff --git a/src/model/Position.php b/src/model/Position.php deleted file mode 100644 index fdba271..0000000 --- a/src/model/Position.php +++ /dev/null @@ -1,50 +0,0 @@ -children); $i++) - { - $tmp = $this->children[$i]; - $j = $i - 1; - - // Déplacez les éléments du tableau qui sont plus grands que la clé à une position devant leur position actuelle - while($j >= 0 && $this->children[$j]->getPosition() > $tmp->getPosition()) { - $this->children[$j + 1] = $this->children[$j]; - $j--; - } - $this->children[$j + 1] = $tmp; - } - - // récursivité (utile dans Menu et chemin) - // appel dans Page et dans MenuAndPathController (un tri supplémentaire à faire?) - if(self::class === 'App\Entity\Page'){ - foreach($this->children as $child) { - if(count($child->children) > 0) { - $child->sortChildren($reindexation); - } - } - } - - if($reindexation){ - $this->reindexPositions(); - } - } - - // nouvelles positions (tableau $children => BDD) - public function reindexPositions(): void - { - $i = 1; - foreach($this->children as $child){ - $child->setPosition($i); - $i++; - } - } -} \ No newline at end of file -- cgit v1.2.3