main/core/Manager/HomeManager.php
public function reorderContent($type, $a, $b = null, $father = null)
    {
        $a = $this->getNode($type, $a, $father);
        $a->detach();

        if ($b) {
            $b = $this->getNode($type, $b, $father);
            $a->setBack($b->getBack());
            $a->setNext($b);

            if ($b->getBack()) {
                $b->getBack()->setNext($a);
            }

            $b->setBack($a);
        } else {
            $b = $this->getnode($type, null, $father);
            $a->setNext($b->getNext());
            $a->setBack($b);
            $b->setNext($a);
        }

        $this->manager->persist($a);
        $this->manager->persist($b);
        $this->manager->flush();
    }
public function reorderContent($type, $a, $b = null, $father = null)
    {
        $a = $this->getNode($type, $a, $father);
        $a->detach();

        if ($b) {
            $b = $this->getNode($type, $b, $father);
            $a->setBack($b->getBack());
            $a->setNext($b);

            if ($b->getBack()) {
                $b->getBack()->setNext($a);
            }

            $b->setBack($a);
        } else {
            $b = $this->getnode($type, null, $father);
            $a->setNext($b->getNext());
            $a->setBack($b);
            $b->setNext($a);
        }

        $this->manager->persist($a);
        $this->manager->persist($b);
        $this->manager->flush();
    }
public function reorderContent ( $ type , $ a , $ b = null , $ father = null ) { $ a = $ this -> getNode ( $ type , $ a , $ father ) ; $ a -> detach ( ) ; if ( $ b ) { $ b = $ this -> getNode ( $ type , $ b , $ father ) ; $ a -> setBack ( $ b -> getBack ( ) ) ; $ a -> setNext ( $ b ) ; if ( $ b -> getBack ( ) ) { $ b -> getBack ( ) -> setNext ( $ a ) ; } $ b -> setBack ( $ a ) ; } else { $ b = $ this -> getnode ( $ type , null , $ father ) ; $ a -> setNext ( $ b -> getNext ( ) ) ; $ a -> setBack ( $ b ) ; $ b -> setNext ( $ a ) ; } $ this -> manager -> persist ( $ a ) ; $ this -> manager -> persist ( $ b ) ; $ this -> manager -> flush ( ) ; }
Reorder Contents.
Reorder Contents .