concrete/src/Page/Page.php
public function movePageDisplayOrderToBottom()
    {
        // find the highest cDisplayOrder and increment by 1
        $db = Database::connection();
        $mx = $db->fetchAssoc('select max(cDisplayOrder) as m from Pages where cParentID = ?', [$this->getCollectionParentID()]);
        $max = $mx ? $mx['m'] : 0;
        ++$max;
        $this->updateDisplayOrder($max);
    }
public function movePageDisplayOrderToBottom()
    {
        // find the highest cDisplayOrder and increment by 1
        $db = Database::connection();
        $mx = $db->fetchAssoc('select max(cDisplayOrder) as m from Pages where cParentID = ?', [$this->getCollectionParentID()]);
        $max = $mx ? $mx['m'] : 0;
        ++$max;
        $this->updateDisplayOrder($max);
    }
public function movePageDisplayOrderToBottom ( ) { // find the highest cDisplayOrder and increment by 1 $ db = Database :: connection ( ) ; $ mx = $ db -> fetchAssoc ( 'select max(cDisplayOrder) as m from Pages where cParentID = ?' , [ $ this -> getCollectionParentID ( ) ] ) ; $ max = $ mx ? $ mx [ 'm' ] : 0 ; ++ $ max ; $ this -> updateDisplayOrder ( $ max ) ; }
Make this page the first child of its parent.
Make this page the first child of its parent .